ral-lens-0.2: Length-indexed random access lists: lens utilities.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.RAVec.Lens

Synopsis

Indexing

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

Index lens.

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

Orphan instances

Ixed (RAVec b a) Source # 
Instance details

Methods

ix :: Index (RAVec b a) -> Traversal' (RAVec b a) (IxValue (RAVec b a)) #

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

Methods

each :: Traversal (RAVec n a) (RAVec n b) a b #