You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pure profunctor lenses. A mechanism for updating, viewing, and setting
10
+
values within nested data structures. As in:
11
+
12
+
```purescript
13
+
> structure = Tuple (Tuple (Tuple "hi!" 3) 2) 1
14
+
15
+
> import Data.Lens
16
+
> _leftmost = _1 <<< _1 <<< _1
17
+
18
+
> view _leftmost structure
19
+
"hi!"
20
+
21
+
> set _leftmost "Bye!" structure
22
+
(Tuple (Tuple (Tuple "Bye!" 3) 2) 1)
23
+
24
+
> over _leftmost String.toUpper structure
25
+
(Tuple (Tuple (Tuple "HI!" 3) 2) 1)
26
+
27
+
```
28
+
10
29
11
30
## Installation
12
31
@@ -20,6 +39,8 @@ Module documentation is [published on Pursuit](http://pursuit.purescript.org/pac
20
39
21
40
You can find examples in the [tests](test/Main.purs) and the [examples](examples/README.md) directory.
22
41
42
+
There is an [ebook](https://leanpub.com/lenses).
43
+
23
44
## Contributing
24
45
25
46
Read the [contribution guidelines](https://github.com/purescript-contrib/purescript-profunctor-lenses/blob/master/.github/contributing.md) to get started and see helpful related resources.
0 commit comments