fork download
  1. using System;
  2. using System.Console;
  3. using Nemerle.Macros;
  4. using Nemerle.Imperative;
  5. using Nemerle.Utility;
  6.  
  7. def count=int.Parse(ReadLine());
  8.  
  9. foreach(max in [1..count])
  10. {
  11. def items=[1 .. max];
  12. def itemsReversedIfNeed= if(max%2=0)
  13. items.reverse()
  14. else
  15. items;
  16. WriteLine(String.Join("-", items))
  17. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
6
compilation info
prog.nem:11:12:11:20: error: cannot find the operator `..' on int and int
prog.nem:12:28:12:35: error: needed a writable location for assignment target, got a function call to an operator reference, which is read-only
prog.nem:12:25:12:27: error: expected void, got bool in matched value: the types bool and void are not compatible [simple unify]
prog.nem:13:1:13:14: error: there is no member named `reverse' in list[System.Object+] with type ?
prog.nem:16:11:16:22: error: each overload has an error during call:
prog.nem:16:11:16:22: error: overload #1, method System.String.Join(separator : string, value : array [string]) : string
prog.nem:16:11:16:22: error: in argument #2 (value) of string.Join, needed a array [string], got list[System.Object+]: list[System.Object+] is not a subtype of array [string] [simple require]
prog.nem:16:11:16:22: error: overload #2, method System.String.Join(separator : string, value : array [string], startIndex : int, count : int) : string
prog.nem:16:11:16:22: error: wrong number of parameters in call, needed 4, got 2
stdout
Standard output is empty