lens-4.1.2: Lenses, Folds and Traversals
Data.Tree.Lens
Description
Synopsis
root :: Lens' (Tree a) aSource
A Lens that focuses on the root of a Tree.
Lens
Tree
>>> view root $ Node 42 [] 42
>>>
view root $ Node 42 []
branches :: Lens' (Tree a) [Tree a]Source
A Lens returning the direct descendants of the root of a Tree
view branches ≡ subForest
view
branches
subForest