Commits

Moritz Heidkamp  committed 45d85fd

Replace (apply conc ...) in as-string to not run into apply limit

  • Participants
  • Parent commits 1120931

Comments (0)

Files changed (1)

File comparse.scm

 (define (maybe parser)
   (any-of parser (result #f)))
 
+(define (xconc x y)
+  (conc y x))
+
 (define (as-string parser)
   (sequence* ((parts parser))
-    (result (apply conc (remove boolean? (flatten parts))))))
+    (result (fold xconc "" (remove boolean? (flatten parts))))))
 
 (define memo-table
   (make-parameter #f))