X-Git-Url: https://git.lukelau.me/?p=scheme.git;a=blobdiff_plain;f=ast.scm;h=1a4afe21f3258d829c4f305ea78fd2f804cca2ad;hp=23e7723cc725a3a07b2fe5229576b92e604c34b2;hb=25ef5a684dec5eedfc4e34a12b00a04e2d6b2b1b;hpb=5ea42a37be529974bff32b719bd91e004d1dfcd8 diff --git a/ast.scm b/ast.scm index 23e7723..1a4afe2 100644 --- a/ast.scm +++ b/ast.scm @@ -120,7 +120,7 @@ (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)))))