Package

profunctor-lenses

Repository
purerl/purescript-profunctor-lenses
Uploaded by
nwolverson

Latest release Build status Pursuit Maintainer: garyb Maintainer: thomashoneyman

Pure profunctor lenses. A mechanism for updating, viewing, and setting values within nested data structures. As in:

> structure = Tuple (Tuple (Tuple "hi!" 3) 2) 1

> import Data.Lens
> _leftmost = _1 <<< _1 <<< _1

> view _leftmost structure
"hi!"

> set _leftmost "Bye!" structure 
(Tuple (Tuple (Tuple "Bye!" 3) 2) 1)

> over _leftmost String.toUpper structure
(Tuple (Tuple (Tuple "HI!" 3) 2) 1)

Installation

# with Bower
bower install purescript-profunctor-lenses

# with Spago
spago install profunctor-lenses

Documentation

Module documentation is published on Pursuit. You can find examples in the tests and the examples directory.

There are other in-depth materials for learning about profunctor optics and lenses in PureScript.

Contributing

Read the contribution guidelines to get started and see helpful related resources.

Modules
Data.Lens
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.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
Dependencies