From 5a3bc07079b1e9d1692b15c59369f5e3871705d7 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Thu, 18 Nov 2021 10:19:06 +0200 Subject: WIP Rewrite to point-free style --- samples/sample1.code | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'samples') diff --git a/samples/sample1.code b/samples/sample1.code index f033721..337bd6d 100644 --- a/samples/sample1.code +++ b/samples/sample1.code @@ -1 +1,8 @@ -my-func 1 2 \ No newline at end of file +foo = "foo"; +bar = "bar"; +int.double = int.multiply 2; +list.multiply-all = reduce int.multiply 1; + +ifelse (string.eq? foo bar) + (int.double 1) # if foo = bar, calc 1 * 2 + (int.double 2) # else, calc 2 * 2 -- cgit v1.3