Standard Library
Higher-Order Functions
Take a lambda, work on lists.
New to coding?
Copy the examples exactly first. Run them. Then change one number or word and run them again. You are not expected to memorize the command lists.
1
map / filter / reduce
Try this code
map(xs, fn(x) => x * 2);
filter(xs, fn(x) => x > 0);
reduce(xs, fn(a, b) => a + b, 0);2
sort_by / each / any / all
Try this code
sort_by(xs, fn(x) => x);
each(xs, fn(x) => print(x));
any(xs, fn(x) => x > 5);
all(xs, fn(x) => x > 0);