fork download
  1. #pragma indent
  2. using System.Console;
  3. using Nemerle.Collections;
  4.  
  5. def countLines=int.Parse(ReadLine());
  6.  
  7. foreach(countNumbersInLines in [1 .. countLines])
  8. def listOfIntegers = $[1..countNumbersInLines];
  9. def listOfIntegersReversedIfNeed =
  10. if( countNumbersInLines % 2 == 0 )
  11. List.Rev(listOfIntegers);
  12. else
  13. listOfIntegers;
  14. def listOfString=List.Map(listOfIntegersReversedIfNeed, _.ToString());
  15. def stringLine=string.Join("-", listOfString);
  16. //WriteLine(stringLine)
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
6
compilation info
prog.nem:15:16:15:27: error: each overload has an error during call:
prog.nem:15:16:15:27: error: overload #1, method System.String.Join(separator : string, value : array [string]) : string
prog.nem:15:16:15:27: 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:15:16:15:27: error: overload #2, method System.String.Join(separator : string, value : array [string], startIndex : int, count : int) : string
prog.nem:15:16:15:27: error: wrong number of parameters in call, needed 4, got 2
stdout
Standard output is empty