change syntax for callable
anything that can be applied is now callable, this is the first step for closure, partial application, and call-by-value
This commit is contained in:
@ -41,4 +41,16 @@ increment : fn number => number = function x is
|
||||
is_even : fn number => bool = function x is
|
||||
if x % 2 then true else false
|
||||
|
||||
; invoke a function by name
|
||||
bruh : number = increment(one)
|
||||
|
||||
; invoke a lambda function
|
||||
bruh1 : number = (function x is x)(1)
|
||||
|
||||
; invoke a calculation returns a function
|
||||
bruh2 : fn bool => number = function cond is
|
||||
(if cond then
|
||||
function x is x + 1
|
||||
else
|
||||
function x is x + 2
|
||||
)(0)
|
||||
|
Reference in New Issue
Block a user