Implements the algorithm popFrontN more efficiently. This function does not detect or handle newlines.
See Implementation
Implements the algorithm popFrontN more efficiently. This function does not detect or handle newlines.