Data.RAVec.Tree.Optics
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')) >>> set (ix (W1 $ W0 WE)) 'z' tree Node (Node (Leaf 'a') (Leaf 'b')) (Node (Leaf 'z') (Leaf 'd'))
>>>
let tree = Node (Node (Leaf 'a') (Leaf 'b')) (Node (Leaf 'c') (Leaf 'd'))
set (ix (W1 $ W0 WE)) 'z' tree
Methods
each :: IxTraversal (Wrd n) (Tree n a) (Tree n b) a b #
Associated Types
type IxKind (Tree n a) #
ix :: Index (Tree n a) -> Optic' (IxKind (Tree n a)) NoIx (Tree n a) (IxValue (Tree n a)) #