10 lines
105 B
ChaiScript
10 lines
105 B
ChaiScript
auto x = {1, 2,
|
|
3, 4}
|
|
|
|
assert_equal(1, x[0])
|
|
|
|
auto y = map(x,
|
|
[](x) { x + 1 })
|
|
|
|
assert_equal(2, y[0])
|