HORIZON HASKELLDocslts/ghc-10.0.xaa25b892026-10-10Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · aa25b89 · 2026-10-10

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