lens-3.7.4: Lenses, Folds and Traversals

PortabilityMTPCs
Stabilityprovisional
MaintainerEdward Kmett <ekmett@gmail.com>
Safe HaskellNone

Data.Tree.Lens

Description

 

Synopsis

Documentation

root :: SimpleLens (Tree a) aSource

A Lens that focuses on the root of a Tree.

>>> view root $ Node 42 []
42

branches :: SimpleLens (Tree a) [Tree a]Source

A Lens returning the direct descendants of the root of a Tree

view branchessubForest