SWI-Prolog Did You Know Did you know? SWI-Prolog can lazily parse a file Search Documentation:
Predicate is_stream/1