From c8d473a2e6bfcb463ca4fb3613cf73db8d74e479 Mon Sep 17 00:00:00 2001 From: c+1 Date: Sat, 13 May 2023 14:35:27 -0400 Subject: real --- examples/functional.halk | 1 + examples/hello.halk | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'examples') diff --git a/examples/functional.halk b/examples/functional.halk index 758559c..ba61210 100644 --- a/examples/functional.halk +++ b/examples/functional.halk @@ -7,3 +7,4 @@ let.Y => { λ.x => f.x.x; }.λ.x => f.x.x; } + diff --git a/examples/hello.halk b/examples/hello.halk index 690fb5e..f6a7c9f 100644 --- a/examples/hello.halk +++ b/examples/hello.halk @@ -17,13 +17,13 @@ fn.greeting,to -> { [functions defined with do not prefix it with a namespace/] }; -fn.sum_all._ -> { [variadic functions are possible with the reserved '_' argument, +fn.sum_all,_ -> { [variadic functions are possible with the reserved '_' argument, which is treated as an array] return.foldl.sum,0,_; }; -fn.fibonacci.n -> { - if.or.(=.n, 0), (=.n, 1) -> { [functions ending in '?' should be predicates] +fn.fibonacci,n -> { + if.or.(=.n, 0), (=.n, 1) -> { [functions ending in '?' should be predicates] return.1; }; return.sum. @@ -31,7 +31,7 @@ fn.fibonacci.n -> { (fibonacci. sub.n, 2); }; -fn.main -> { [where our code will begin executing] +fn.main -> { [where our code will begin executing] greeting.[comments can be placed *anywhere*]"world."; exit.0; [exit with code 0 for success] }; -- cgit v1.2.3