peek package:streamly-core

Peek the head element of a stream, without consuming it. Fails if it encounters end of input.
>>> Stream.parse ((,) <$> Parser.peek <*> Parser.satisfy (> 0)) $ Stream.fromList [1]
Right (1,1)
peek = lookAhead (satisfy True)
peekAt byte-offset array reads an element of type a from the the given the byte offset in the array. IMPORTANT: The implementation of this interface may not check the bounds of the array, the caller must not assume that.
peekAt byte-offset array reads an element of type a from the the given the byte offset in the array. IMPORTANT: The implementation of this interface may not check the bounds of the array, the caller must not assume that.
Deprecated: Use peekAt.
Discard the specified number of bytes in the array.
Create a Haskell value from its unboxed representation from the head of a byte array, return the value and the remaining array.
Really really unsafe, create a Haskell value from an unboxed byte array, does not check if the array is big enough, may return garbage or if you are lucky may cause a segfault. Internal
Chains peek functions that pass the current position to the next function