Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
20
Task/Arrays/Nemerle/arrays.nemerle
Normal file
20
Task/Arrays/Nemerle/arrays.nemerle
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
using System;
|
||||
using System.Console;
|
||||
using System.Collections;
|
||||
|
||||
module ArrayOps
|
||||
{
|
||||
Main() : void
|
||||
{
|
||||
def fives = array(10);
|
||||
foreach (i in [1 .. 10]) fives[i - 1] = i * 5;
|
||||
def ten = fives[1];
|
||||
WriteLine($"Ten: $ten");
|
||||
|
||||
def dynamic = ArrayList();
|
||||
dynamic.Add(1);
|
||||
dynamic.Add(3);
|
||||
dynamic[1] = 2;
|
||||
foreach (i in dynamic) Write($"$i\t"); // Nemerle isn't great about displaying arrays, it's better with lists though
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue