diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/lux.lux | 62 |
1 files changed, 18 insertions, 44 deletions
diff --git a/source/lux.lux b/source/lux.lux index 03c2a6054..2882207d6 100644 --- a/source/lux.lux +++ b/source/lux.lux @@ -69,60 +69,34 @@ ))) (declare-macro lambda) -## (def' lambda -## (lambda' _ tokens -## (lambda' _ state -## (let' output (case' tokens -## (#Cons [(#Form (#Cons [self (#Cons [arg args'])])) (#Cons [body #Nil])]) -## (#Form (#Cons [(#Ident "lambda'") -## (#Cons [self -## (#Cons [arg -## (#Cons [(case' args' -## #Nil -## body - -## _ -## (#Form (#Cons [(#Ident "lux;lambda") -## (#Cons [(#Form (#Cons [(#Ident "_") args'])) -## (#Cons [body #Nil])])]))) -## #Nil])])])]))) -## [(#Cons [output #Nil]) state]) -## ))) - - -## (def' lambda -## (lambda' _ tokens -## (lambda' _ state -## (let' output (case' tokens -## (#Cons [(#Form (#Cons [self (#Cons [arg args'])])) (#Cons [body #Nil])]) -## (#Form (#Cons [(#Ident "lambda'") -## (#Cons [self -## (#Cons [arg -## (#Cons [(case args' -## #Nil -## body - -## _ -## (#Form (#Cons [(#Ident "lux;lambda") -## (#Cons [(#Form (#Cons [(#Ident "_") args'])) -## (#Cons [body #Nil])])]))) -## #Nil])])])]))) -## [(#Cons output #Nil) state]) -## ))) +(def' def + (lambda (_ tokens state) + (let' output (case' tokens + (#Cons [(#Ident name) (#Cons [body #Nil])]) + (#Form (#Cons [(#Ident "def'") tokens])) + + (#Cons [(#Form (#Cons [(#Ident name) args])) + (#Cons [body #Nil])]) + (#Form (#Cons [(#Ident "def'") + (#Cons [(#Ident name) + (#Cons [(#Form (#Cons [(#Ident "lux;lambda") + (#Cons [(#Form (#Cons [(#Ident name) args])) + (#Cons [body #Nil])])])) + #Nil])])]))) + [(#Cons [output #Nil]) state]))) +(declare-macro def) ## (def' def ## (lambda (_ tokens state) ## (let' output (case' tokens ## (#Cons (#Ident name) (#Cons body #Nil)) -## (#Form (#Cons (#Ident "def'") -## (#Cons (#Ident name) -## (#Cons body #Nil)))) +## (#Form (#Cons (#Ident "def'") tokens)) ## (#Cons (#Form (#Cons (#Ident name) args)) ## (#Cons body #Nil)) ## (#Form (#Cons (#Ident "def'") ## (#Cons (#Ident name) -## (#Cons (#Form (#Cons (#Ident "lux:lambda") +## (#Cons (#Form (#Cons (#Ident "lux;lambda") ## (#Cons (#Form (#Cons (#Ident name) args)) ## (#Cons body #Nil)))) ## #Nil))))) |