O(1) Extract the first element of a ByteString, which must be non-empty. An exception will be thrown in the case of an empty ByteString.
This is a partial function, consider using uncons instead.
:: a typeCtrl KGHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27
Modulerio-0.1.22.0Haskell2010
Strict ByteString partial functions. Import as:
import qualified RIO.ByteString.Partial as B'O(1) Extract the first element of a ByteString, which must be non-empty. An exception will be thrown in the case of an empty ByteString.
This is a partial function, consider using uncons instead.
O(1) Extract the last element of a ByteString, which must be finite and non-empty. An exception will be thrown in the case of an empty ByteString.
This is a partial function, consider using unsnoc instead.
O(1) Extract the elements after the head of a ByteString, which must be non-empty. An exception will be thrown in the case of an empty ByteString.
This is a partial function, consider using uncons instead.
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.
ByteStrings (folds)foldl1 is a variant of foldl that has no starting value argument, and thus must be applied to non-empty ByteStrings. An exception will be thrown in the case of an empty ByteString.
foldr1 is a variant of foldr that has no starting value argument, and thus must be applied to non-empty ByteStrings An exception will be thrown in the case of an empty ByteString.
O(n) maximum returns the maximum value from a ByteString An exception will be thrown in the case of an empty ByteString.
O(n) minimum returns the minimum value from a ByteString An exception will be thrown in the case of an empty ByteString.