scanLines -- apply a function to each line of a file
Synopsis
Usage:
scanLines(f,fn)
Inputs:
f
fn, the name of a file, or a list of names of files
Outputs:
returns null unless the function uses break x with a non-null value for x, in which case scanning stops and x is returned immediately
Consequences:
applies f to each line of the file(s)
Description
The file is read and processed one block at a time, making this procedure potentially much better at conserving memory than scan(lines get fn,f) when the file is very large.