Portability | non-portable |
---|---|
Stability | provisional |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Safe Haskell | Trustworthy |
This module provides lenses and traversals for working with generic vectors.
- toVectorOf :: Getting (Endo [a]) s t a b -> s -> Vector a
- vector :: Iso [a] [b] (Vector a) (Vector b)
- reversed :: Iso (Vector a) (Vector b) (Vector a) (Vector b)
- forced :: Iso (Vector a) (Vector b) (Vector a) (Vector b)
- _head :: SimpleLens (Vector a) a
- _tail :: SimpleLens (Vector a) (Vector a)
- _last :: SimpleLens (Vector a) a
- _init :: SimpleLens (Vector a) (Vector a)
- sliced :: Int -> Int -> SimpleLens (Vector a) (Vector a)
- ordinal :: Int -> SimpleIndexedLens Int (Vector a) a
- ordinals :: [Int] -> SimpleIndexedTraversal Int (Vector a) a
Documentation
toVectorOf :: Getting (Endo [a]) s t a b -> s -> Vector aSource
Isomorphisms
reversed :: Iso (Vector a) (Vector b) (Vector a) (Vector b)Source
Convert a Vector
to a version with all the elements in the reverse order
forced :: Iso (Vector a) (Vector b) (Vector a) (Vector b)Source
Convert a Vector
to a version that doesn't retain any extra memory.
Lenses
_head :: SimpleLens (Vector a) aSource
_tail :: SimpleLens (Vector a) (Vector a)Source
_last :: SimpleLens (Vector a) aSource
_init :: SimpleLens (Vector a) (Vector a)Source
:: Int |
|
-> Int |
|
-> SimpleLens (Vector a) (Vector a) |