Skip to content

Commit

Permalink
Update compiler.sc
Browse files Browse the repository at this point in the history
  • Loading branch information
guenchi authored Sep 6, 2018
1 parent 3ce2243 commit 420d276
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions compiler.sc
Original file line number Diff line number Diff line change
Expand Up @@ -158,17 +158,14 @@
((#\( ,(Arg -> a ...) #\) #\= #\> #\{ ,(Expr -> e) #\})
`(lambda (,a ...) ,e)))))
(match lst
((,(Var -> x) #\+ ,(Var -> y))`(+ ,x ,y))
((,(Var -> x) #\- ,(Var -> y))`(- ,x ,y))
((,(Var -> x) #\* ,(Var -> y))`(* ,x ,y))
((,(Var -> x) #\/ ,(Var -> y))`(/ ,x ,y))
((,i #\= ,x)`(set! ,i ,x))
((print #\( ,x #\))`(display ,x))
((var ,i #\= ,x)`(define ,i ,x))
((let ,i #\= ,x)`(define ,i ,x))
((const ,i #\= ,x)`(define ,i ,x))
((,f #\( ,x ... #\))`(,f ,x ...))
(,(Func -> f) `,f))))
(,(Func -> f) `,f)
(,(Expr -> e) `,e))))



Expand Down

0 comments on commit 420d276

Please sign in to comment.