rio-0.1.22.0: A standard library for Haskell

Safe Haskell | Safe-Inferred
Language | Haskell2010

RIO.List.Partial

Contents

- Basic functions
- Reducing lists (folds)
  - Special folds
- Building lists
  - Scans
- Indexing lists

Description

`List` partial functions. Import as:

    import qualified RIO.List.Partial as L'

Synopsis

- head :: HasCallStack => [a] -> a
- last :: HasCallStack => [a] -> a
- tail :: HasCallStack => [a] -> [a]
- init :: HasCallStack => [a] -> [a]
- foldl1 :: Foldable t => (a -> a -> a) -> t a -> a
- foldl1' :: HasCallStack => (a -> a -> a) -> [a] -> a
- foldr1 :: Foldable t => (a -> a -> a) -> t a -> a
- maximum :: (Foldable t, Ord a) => t a -> a
- minimum :: (Foldable t, Ord a) => t a -> a
- maximumBy :: Foldable t => (a -> a -> Ordering) -> t a -> a
- minimumBy :: Foldable t => (a -> a -> Ordering) -> t a -> a
- scanl1 :: (a -> a -> a) -> [a] -> [a]
- scanr1 :: (a -> a -> a) -> [a] -> [a]
- (!!) :: HasCallStack => [a] -> Int -> a

# Basic functions

head :: HasCallStack => [a] -> a #

last :: HasCallStack => [a] -> a #

tail :: HasCallStack => [a] -> [a] #

init :: HasCallStack => [a] -> [a] #

# Reducing lists (folds)

foldl1 :: Foldable t => (a -> a -> a) -> t a -> a #

foldl1' :: HasCallStack => (a -> a -> a) -> [a] -> a #

foldr1 :: Foldable t => (a -> a -> a) -> t a -> a #

## Special folds

maximum :: (Foldable t, Ord a) => t a -> a #

minimum :: (Foldable t, Ord a) => t a -> a #

maximumBy :: Foldable t => (a -> a -> Ordering) -> t a -> a #

minimumBy :: Foldable t => (a -> a -> Ordering) -> t a -> a #

# Building lists

## Scans

scanl1 :: (a -> a -> a) -> [a] -> [a] #

scanr1 :: (a -> a -> a) -> [a] -> [a] #

# Indexing lists

(!!) :: HasCallStack => [a] -> Int -> a #