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

12 lines
328 B
Plaintext
Raw Normal View History

2022-03-12 16:00:42 -06:00
fun foo (xs: int): int = return xs + 1;
fun bar (xs: int) (x: int): int = return xs - x;
2022-03-15 19:36:39 -05:00
fun main: void = do
2022-03-12 23:03:07 -06:00
foo(69) -- 69 + 1 => 70
|> bar(_, 1) -- '70 - 1 => 69
|> @write(_); -- '69 => stdout
2022-03-12 16:03:00 -06:00
2022-03-12 23:03:07 -06:00
foo(60) -- 60 + 1 => 61
|> bar(130, _) -- 130 - '61 => 69
|> @write(_); -- '69 => stdout
2022-03-12 16:00:42 -06:00
end;