init package:bytestring

O(1) Returns all the elements of a ByteString except the last one. An exception will be thrown in the case of an empty ByteString. This is a partial function, consider using unsnoc instead.
O(n/c) Returns all the elements of a ByteString except the last one. This is a partial function, consider using unsnoc instead.
O(n) Return all the elements of a ShortByteString except the last one. An exception will be thrown in the case of an empty ShortByteString. This is a partial function, consider using unsnoc instead. Note: copies the entire byte array
O(n) Returns all initial segments of the given ByteString, shortest first.
O(n) Returns all initial segments of the given ByteString, shortest first.
Returns all initial segments of the given ByteString, shortest first.
Returns all initial segments of the given ByteString, shortest first.
A variety of init for non-empty ByteStrings. unsafeInit omits the check for the empty case. As with unsafeHead, the programmer must provide a separate proof that the ByteString is non-empty.