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

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

Modulerio-0.1.25.0Haskell2010

RIO.NonEmpty.Partial

NonEmpty list partial functions. Import as:

import qualified RIO.NonEmpty.Partial as NE'
  • 2 values
  • Packagerio-0.1.25.0
  • Exports2
  • LanguageHaskell2010
  • LicenceMIT
  • SourcePartial.hs

Indexing streams

1 declaration
value(!!) :: HasCallStack => NonEmpty a -> Int -> a
#

xs !! n returns the element of the stream xs at index n. Note that the head of the stream has index 0.

Beware: a negative or out-of-bounds index will cause an error.

Converting to and from a list

1 declaration