Module
Data.Lens.At
- Package
- purescript-profunctor-lenses
- Repository
- purescript-contrib/purescript-profunctor-lenses
#At Source
class (Index m a b) <= At m a b | m -> a, m -> b where
At
is a type class whose instances let you add
new elements or delete old ones from "container-like" types:
whole = Map.singleton "key" "value"
optic = at "key"
view optic whole == Just "value"
set optic (Just "NEW") whole == Map.singleton "key" "NEW"
set optic Nothing whole == Map.empty
If you don't want to add or delete, but only to view or change
an existing element, see Data.Lens.Index
.
Members
Instances
- Modules
- Data.
Lens - Data.
Lens. AffineTraversal - Data.
Lens. At - Data.
Lens. Common - Data.
Lens. Fold - Data.
Lens. Fold. Partial - Data.
Lens. Getter - Data.
Lens. Grate - Data.
Lens. Index - Data.
Lens. Indexed - Data.
Lens. Internal. Bazaar - Data.
Lens. Internal. Exchange - Data.
Lens. Internal. Focusing - Data.
Lens. Internal. Forget - Data.
Lens. Internal. Grating - Data.
Lens. Internal. Indexed - Data.
Lens. Internal. Market - Data.
Lens. Internal. Re - Data.
Lens. Internal. Shop - Data.
Lens. Internal. Stall - Data.
Lens. Internal. Tagged - Data.
Lens. Internal. Wander - Data.
Lens. Internal. Zipping - Data.
Lens. Iso - Data.
Lens. Iso. Newtype - Data.
Lens. Lens - Data.
Lens. Lens. Product - Data.
Lens. Lens. Tuple - Data.
Lens. Lens. Unit - Data.
Lens. Lens. Void - Data.
Lens. Prism - Data.
Lens. Prism. Coproduct - Data.
Lens. Prism. Either - Data.
Lens. Prism. Maybe - Data.
Lens. Record - Data.
Lens. Setter - Data.
Lens. Traversal - Data.
Lens. Types - Data.
Lens. Zoom