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 arrayOfString = List.ToArray(listOfString);
  16. def stringLine = string.Join("-", arrayOfString);
  17. WriteLine(stringLine)
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
6
compilation info
prog.nem:15:21:15:33: error: unbound name `List.ToArray'
stdout
Standard output is empty