factor-tutorial icon indicating copy to clipboard operation
factor-tutorial copied to clipboard

Mistake with `file-lines`

Open alex-ilin opened this issue 7 years ago • 3 comments

You write about file-lines that it "lazily iterates over lines". That is not true: file-lines is not lazy, it reads the entire file and creates the array of lines as soon as you call it.

alex-ilin avatar Dec 29 '17 00:12 alex-ilin

For example, "license.txt" utf8 file-lines will return an array of all lines in the "license.txt" file, not some substitute object you could lazily retrieve data from.

alex-ilin avatar Dec 29 '17 00:12 alex-ilin

Maybe they meant to say each-file-line or something.

mrjbq7 avatar Dec 29 '17 04:12 mrjbq7

Do we have each-file-line? The help browser couldn't find it...

alex-ilin avatar Dec 29 '17 10:12 alex-ilin