Data.RAVec.Tree.DF.Lens
Contents
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'))
>>>
let tree = Node (Node (Leaf 'a') (Leaf 'b')) (Node (Leaf 'c') (Leaf 'd'))
tree & ix (W1 $ W0 WE) .~ 'z'
Methods
ix :: Index (Tree n a) -> Traversal' (Tree n a) (IxValue (Tree n a)) #
each :: Traversal (Tree n a) (Tree n b) a b #