nilang 0.4.1

A scripting language interpreter for Advent of Code
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
fn new_counter() {
  count = { val: 0 };

  return fn() {
    count.val = count.val + 1;

    return count.val;
  };
}

counter = new_counter();

i = 0;
while i < 10 {
  print(counter());
  i = i + 1;
}