HORIZON HASKELLDocslts/ghc-9.14.x45dd5372026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 45dd537 · 2026-10-11

Modulelinear-base-0.8.1

Data.List.NonEmpty.Linear

  • 1 type
  • 43 values
valuehead :: NonEmpty a -> a
#

Extract the first element of the stream.

valueinit :: NonEmpty a -> [a]
#

Extract everything except the last element of the stream.

valuelast :: NonEmpty a -> a
#

Extract the last element of the stream.

valuetail :: NonEmpty a -> [a]
#

Extract the possibly-empty tail of the stream.

datadata NonEmpty a
#

Non-empty (and non-strict) list type.

Constructors

  • a :| [a]infixr 5
Instances46Monad, MonadFix, Applicative, Foldable, MonadZip, Foldable1, …