another list processing style programming language
- no false or nil, only 0
- no dotted lists, the last cdr is not shown
- functions are curried, there are no variadic functions (but macros receive list arguments)
- application is left to right one argument at a time
- data are own constant functions
- singleton list is
quote
, there are no nullary functions, just pass 0 and ignore it :) (, a b c d)
is likebegin
(\ a b c x)
islambda
(a b c
are arguments andx
is body, use,
for multiple expressions)(? a b c d e f g)
iscond
(g is default branch)(: a x b y c z (a b c))
is likelet*
(if no expression then return last definition)
cons
isX
,car
isA
,cdr
isB
.
prints a value and returns it
L
is macro similar to list
((\ l (L l (L l))) '(\ l (L l (L l))))
exponent operation exp
would simply be identity function
(: (add a b f x) (a f (b f x))
(mul a b f) (a (b f))
(zero a b) b
one (zero zero)
two (add one one)
three (add one two)
four (add two two)
five (add two three)
six (mul two three)
seven (add one six)
(. (mul two (mul five (mul six seven)) (+ 1) 0)))