fork download
  1. using System;
  2. using System.Console;
  3. using Nemerle;
  4. using Nemerle.Macros;
  5. using Nemerle.Imperative;
  6. using Nemerle.Utility;
  7.  
  8. def count=int.Parse(ReadLine());
  9.  
  10. foreach(max in [1 .. count])
  11. {
  12. def items= $[1..max];
  13. def itemsReversedIfNeed= if(max % 2 == 0)
  14. items.Rev()
  15. else
  16. items;
  17. def line=String.Join("-", itemsReversedIfNeed.Map(_.ToString()));
  18. WriteLine(line)
  19. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
6
compilation info
prog.nem:17:10:17:21: error: each overload has an error during call:
prog.nem:17:10:17:21: error: overload #1, method System.String.Join(separator : string, value : array [string]) : string
prog.nem:17:10:17:21: error: in argument #2 (value) of string.Join, needed a array [string], got list[?]: list[?] is not a subtype of array [string] [simple require]
prog.nem:17:10:17:21: error: overload #2, method System.String.Join(separator : string, value : array [string], startIndex : int, count : int) : string
prog.nem:17:10:17:21: error: wrong number of parameters in call, needed 4, got 2
stdout
Standard output is empty