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