goon

goon

https://git.tonybtw.com/goon.git git://git.tonybtw.com/goon.git
336 bytes raw
1
// Ranges and map function
2
3
let workspaces = [1..9];
4
5
let make_ws = (n) => {
6
    id = n;
7
    name = "workspace ${n}";
8
};
9
10
{
11
    // Simple range
12
    numbers = [1..5];
13
14
    // Range with map
15
    workspace_configs = map(workspaces, make_ws);
16
17
    // Inline map with range
18
    doubled = map([1..10], (n) => { original = n; value = n; });
19
}