Files
orchid/examples/list-processing/main.orc
Lawrence Bethlenfalvy 86e520e8b8 September-october commit
- manual parser
- stl refinements
- all language constructs are now Send
2023-10-11 18:27:50 +01:00

14 lines
279 B
Plaintext

import std::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::unwrap;
cps println $ to_string sum;
0
}