(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)
(append (range s (- n 1))
(list (+ s (- n 1))))))
-(define (flat-map f . xs) (fold-left append '() (map f xs)))
+(define (flat-map f . xs) (fold-left append '() (apply map (cons f xs))))
(define (repeat x n) (if (<= n 0) '()
(cons x (repeat x (- n 1)))))