ral-optics-0.2.1: Length-indexed random access lists: optics utilities.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.RAVec.Optics

Synopsis

Indexing

ix :: Pos b -> Lens' (RAVec b a) a Source #

Index lens.

>>> let Just ral = fromList "xyz" :: Maybe (RAVec B.Bin3 Char)
>>> set (ix maxBound) 'Z' ral
NonEmpty (NE (Cons1 (Leaf 'x') (Last (Node (Leaf 'y') (Leaf 'Z')))))

Orphan instances

Each (Pos n) (RAVec n a) (RAVec n b) a b Source # 
Instance details

Methods

each :: IxTraversal (Pos n) (RAVec n a) (RAVec n b) a b #

Ixed (RAVec b a) Source # 
Instance details

Associated Types

type IxKind (RAVec b a) #

Methods

ix :: Index (RAVec b a) -> Optic' (IxKind (RAVec b a)) NoIx (RAVec b a) (IxValue (RAVec b a)) #