Welcome to the CHICKEN Scheme pasting service

no title added by anonymous on Thu Apr 15 20:32:12 2021

;;; myfile.txt is 1.3MB and has 25361 lines

(define lines 
  (call-with-input-file "myfile.txt"
    (lambda (port) 
      (intersperse (read-lines port) "\n"))))
(apply string-append lines) ; Takes forever

(define lines 
  (call-with-input-file "myfile.txt"
    (lambda (port) 
      read-lines port))))
(apply string-append (intersperse lines "\n")) ; Takes forever

(define lines 
  (call-with-input-file "myfile.txt"
    (lambda (port) 
      read-lines port))))
(apply string-append lines) ; Works fine

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
Name of the CHICKEN extension manager:
Visually impaired? Let me spell it for you (wav file) download WAV