aboutsummaryrefslogtreecommitdiff
path: root/source/lux.lux
diff options
context:
space:
mode:
authorEduardo Julian2015-09-06 01:03:19 -0400
committerEduardo Julian2015-09-06 01:03:19 -0400
commit455018ec68f2c127db489048351bc48f3982fe23 (patch)
treeeeedcea7b210e4c12ccdedf4fec448e23686aabc /source/lux.lux
parent9acccd0847d6bb28e706223439eb44e5a3fe9aff (diff)
- Expanded the standard library.
- Fixed some minor bugs. - Added the updated code for the parser (forgot to add it to a previous commit).
Diffstat (limited to '')
-rw-r--r--source/lux.lux16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/lux.lux b/source/lux.lux
index 5f5c6925b..164dea835 100644
--- a/source/lux.lux
+++ b/source/lux.lux
@@ -2932,23 +2932,23 @@
_
(fail "Can only \"use\" records.")))
+
+ [_ (#TupleS members)]
+ (return (@list (foldL (: (-> AST AST AST)
+ (lambda [body' struct'] (` (;;using (~ struct') (~ body')))))
+ body
+ members)))
_
(let [dummy (symbol$ ["" ""])]
(return (@list (` (;_lux_case (~ struct)
(~ dummy)
- (;using (~ dummy)
- (~ body))))))))
+ (;;using (~ dummy)
+ (~ body))))))))
_
(fail "Wrong syntax for using")))
-(def (flip f)
- (All [a b c]
- (-> (-> a b c) (-> b a c)))
- (lambda [y x]
- (f x y)))
-
(defmacro #export (cond tokens)
(if (i= 0 (i% (length tokens) 2))
(fail "cond requires an even number of arguments.")