`phrase_from_stream` with a tail

Is there a version of phrase_from_stream/2 with a tail? Many times I just want to parse the header of a file, without having to use something like remainder (from dcg/basics) to consume the rest of the file.

remainder//1 is a simple fact. If you apply it to a lazy list it will return the lazy list without materializing it.

1 Like

Thanks for clarifying!