Files
orchid/examples/list-processing/main.orc
Lawrence Bethlenfalvy ed0d64d52e Almost Alpha
Massive improvements across the board.

One day I'll adopt incremental commits.
2024-02-24 00:31:00 +00:00

14 lines
306 B
Plaintext

import std::conv::to_string
export const main := do{
let foo = list::new[1, 2, 3, 4, 5, 6];
let bar = list::map foo n => n * 2;
let sum = bar
|> list::skip 2
|> list::take 3
|> list::reduce ((a, b) => a + b)
|> option::assume;
cps println $ to_string sum;
exit_status::success
}