Medium · Streams & I/O

File line iterator

Design an iterator that returns a text file one line at a time.

File line iterator memory room
Under the lens the next parcel unfolds itself into a line of text, then refolds the instant Leo's brush comes near. — Each Next serves one line.

Retrieval check

With the notes hidden, what pattern should this room bring back?

Related free rooms