HORIZON HASKELLDocslts/ghc-10.0.x77a86622026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 77a8662 · 2026-10-31

Modulerio-0.1.25.0Haskell2010

RIO.NonEmpty.Partial

NonEmpty list partial functions. Import as:

import qualified RIO.NonEmpty.Partial as NE'
Contents
  1. Indexing streams
  2. Converting to and from a list
Synopsis
  • Packagerio-0.1.25.0
  • Exports2
  • LanguageHaskell2010
  • LicenceMIT
  • SourcePartial.hs

Indexing streams

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