Did you know ... Search Documentation:
Predicate read_file/2
 read_file(+File, -Term) is multi
Unifies Term with the lines in File, and allows to get the next lines on backtracking. The terms are read using read_term(Stream, Term, []).