forked from Orchid/orchid
- removed many panics from the pipeline - extracted project and const tree to representations - extended STL list support - improved loops
13 lines
299 B
Plaintext
13 lines
299 B
Plaintext
import std::(proc::*, io::print, to_string)
|
|
|
|
export 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 print $ to_string sum ++ "\n";
|
|
0
|
|
} |