diff options
author | Eduardo Julian | 2014-12-15 20:07:05 -0400 |
---|---|---|
committer | Eduardo Julian | 2014-12-15 20:07:05 -0400 |
commit | a37f958774bd0f7b1800a68a44492e4f95d26e8c (patch) | |
tree | fcfcb3cd01d012ad46f5af80e667235736cf75d7 /test2.lang | |
parent | 5883c0d11c21a74ba493ea369ff01d7baed80a41 (diff) |
Added lambdas! (not yet real closures, but coming soon...)
Diffstat (limited to 'test2.lang')
-rw-r--r-- | test2.lang | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/test2.lang b/test2.lang index e52e667d7..c8f2147ed 100644 --- a/test2.lang +++ b/test2.lang @@ -25,9 +25,16 @@ (def sample (#Tag "value")) (def (constant x y) - y) + x) (def (main args) (if true - (_. (_.. System out) (println ["TRUE" "YOLO"])) + (_. (_.. System out) (println ((lambda [x y] x) "TRUE" "YOLO"))) (_. (_.. System out) (println "FALSE")))) + +#( (let output ((lambda [x y] x) "TRUE" "YOLO") + (_. (_.. System out) (println output))) )# +#( (let f (lambda [x y] x) + (_. (_.. System out) (println (f "TRUE" "YOLO")))) )# +## ((lambda [x y] (_. (_.. System out) (println x))) "TRUE" "YOLO") +## (_. (_.. System out) (println ((lambda [x y] x) "TRUE" "YOLO"))) |