fakir/examples/lambda.fk

34 lines
337 B
Plaintext
Raw Permalink Normal View History

;; CALL LAMBDA
;; ===========
(assert= 2 (
(-> (x y) x)
2 3
))
(assert= 3 (
(-> (x y) y)
2 3
))
(assert= 7 (
(-> (x)
($ a 39)
x)
7))
;; CALL IDENT
;; ==========
($ a (-> (x y) y))
(assert= 9 (a 3 9))
;; RETURN LAMBDA
;; =============
($ b (-> () (-> () 32)))
(assert= 32 ((b)))
(assert-static-fail ((b 7)))