1
1
Fork 0
mirror of https://github.com/azur1s/bobbylisp.git synced 2024-10-16 02:37:40 -05:00
bobbylisp/example/pipe.hz

14 lines
346 B
Plaintext

fun foo (xs: int): int = return xs + 1;
fun bar (xs: int) (x: int): int = return xs - x;
fun main: int = do
foo(69) -- 69 + 1 => 70
|> bar(_, 1) -- '70 - 1 => 69
|> @write(_); -- '69 => stdout
@write("\n");
foo(60) -- 60 + 1 => 61
|> bar(130, _) -- 130 - '61 => 69
|> @write(_); -- '69 => stdout
end;