HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulerio-0.1.22.0Haskell2010

RIO.NonEmpty.Partial

NonEmpty list partial functions. Import as:

import qualified RIO.NonEmpty.Partial as NE'
  • 2 values
  • Packagerio-0.1.22.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