fork download
  1. #pragma indent
  2. using System.Console;
  3. using Nemerle.Collections;
  4. using Nemerle.Utility;
  5.  
  6. def countLines=int.Parse(ReadLine());
  7.  
  8. foreach(countNumbersInLines in [1 .. countLines])
  9. def listOfIntegers = $[1..countNumbersInLines];
  10. def listOfIntegersReversedIfNeed =
  11. if( countNumbersInLines % 2 == 0 )
  12. List.Rev(listOfIntegers);
  13. else
  14. listOfIntegers;
  15. def listOfString = List.Map(listOfIntegersReversedIfNeed, _.ToString());
  16. def arrayOfString = NArray.FromList(listOfString);
  17. def stringLine = string.Join("-", arrayOfString);
  18. WriteLine(stringLine)
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
6
compilation info
prog.nem:16:21:16:36: error: in argument #1 of Nemerle.Utility.NArray.FromList.[?], needed a (System.Type * list[?]), got list[?]: list[?] is not a subtype of (System.Type * list[?]) [simple require]
stdout
Standard output is empty