Take for example takeWhile. Internally it uses span.
Does that mean it just references the input bytestring? Probably not, if so, is there a way to achieve this?
The motivating usecase is a large (>2gb) file that I want to map into memory and extract bytestrings pointing into the mapped memory.