projects
/
scheme.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
25ef5a6
)
Fix let-bindings
author
Luke Lau
<luke_lau@icloud.com>
Sun, 4 Aug 2019 18:23:09 +0000
(19:23 +0100)
committer
Luke Lau
<luke_lau@icloud.com>
Sun, 4 Aug 2019 18:23:09 +0000
(19:23 +0100)
ast.scm
patch
|
blob
|
history
diff --git
a/ast.scm
b/ast.scm
index 1a4afe21f3258d829c4f305ea78fd2f804cca2ad..3b4d164b9e23fa71a1c3547c01dd6a20fbe13dac 100644
(file)
--- a/
ast.scm
+++ b/
ast.scm
@@
-73,7
+73,7
@@
(define (let-bindings e)
(define (pattern-match x body)
(if (eqv? (ast-type x) 'var)
(define (let-bindings e)
(define (pattern-match x body)
(if (eqv? (ast-type x) 'var)
- (
cons x body
)
+ (
list (cons x body)
)
(let* ([constructor (car x)]
[destructor (lambda (i) `(destruct ,i ,constructor))])
(flat-map (lambda (y i)
(let* ([constructor (car x)]
[destructor (lambda (i) `(destruct ,i ,constructor))])
(flat-map (lambda (y i)