Pure profunctor lenses
PureScript
Clone or download
marick Merge pull request #94 from marick/master
Added explanatory text to landing page
Latest commit c7e5d92 Jul 17, 2018

README.md

purescript-profunctor-lenses

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

bower install purescript-profunctor-lenses

Documentation

Module documentation is published on Pursuit.

You can find examples in the tests and the examples directory.

There is an ebook.

Contributing

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