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

Data.RAVec.Tree.Lens

Synopsis

Indexing

ix :: Wrd n -> Lens' (Tree n a) a Source #

Index lens.

>>> let tree = Node (Node (Leaf 'a') (Leaf 'b')) (Node (Leaf 'c') (Leaf 'd'))
>>> tree & ix (W1 $ W0 WE) .~ 'z'
Node (Node (Leaf 'a') (Leaf 'b')) (Node (Leaf 'z') (Leaf 'd'))

Orphan instances

Ixed (Tree n a) Source # 
Instance details

Methods

ix :: Index (Tree n a) -> Traversal' (Tree n a) (IxValue (Tree n a)) #

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

Methods

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