incipit-base-0.5.0.0: A Prelude for Polysemy – Base Reexports
Safe HaskellSafe-Inferred
LanguageHaskell2010

Incipit.List

Description

Variants of the uncons and unsnoc combinators for lists that return Maybe.

Synopsis

Documentation

head :: [a] -> Maybe a Source #

Return Just the head of a list.

last :: [a] -> Maybe a Source #

Return Just the last element of a list.

init :: [a] -> Maybe [a] Source #

Return Just the non-last elements of a list.

tail :: [a] -> Maybe [a] Source #

Return Just the non-head elements of a list.