diff options
author | Eduardo Julian | 2015-09-06 01:03:19 -0400 |
---|---|---|
committer | Eduardo Julian | 2015-09-06 01:03:19 -0400 |
commit | 455018ec68f2c127db489048351bc48f3982fe23 (patch) | |
tree | eeedcea7b210e4c12ccdedf4fec448e23686aabc /source/lux.lux | |
parent | 9acccd0847d6bb28e706223439eb44e5a3fe9aff (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.lux | 16 |
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.") |