Safe Haskell | None |
---|---|
Language | Haskell2010 |
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'))
>>>
set (ix (W1 $ W0 WE)) 'z' tree
Node (Node (Leaf 'a') (Leaf 'b')) (Node (Leaf 'z') (Leaf 'd'))