Portability | non-portable |
---|---|
Stability | experimental |
Maintainer | hpacheco@di.uminho.pt |
Pointless Lenses: bidirectional lenses with point-free programming
This module provides examples, examples and more examples.
- length_lns :: a -> Lens [a] Nat
- zip_lns :: Either (Either One (b, [b])) (a, [a]) -> Lens ([a], [b]) [(a, b)]
- filter_lns :: Lens [Either a b] [a]
- cat_lns :: Lens ([a], [a]) [a]
- data Tree a
- flatten_lns :: Lens (Tree a) [a]
- concat_lns :: Lens [[a]] [a]
- map_lns :: Lens c a -> Lens [c] [a]
- data T a
- aux :: T a -> a
Documentation
length_lns :: a -> Lens [a] NatSource
List length lens.
zip_lns :: Either (Either One (b, [b])) (a, [a]) -> Lens ([a], [b]) [(a, b)]Source
List zipping lens. The aux transformation is merely for simplifying the constant argument
filter_lns :: Lens [Either a b] [a]Source
List filtering lens.
The argument passed to snd_lns
can be undefined because it will never be used
flatten_lns :: Lens (Tree a) [a]Source
Flatten a tree.
concat_lns :: Lens [[a]] [a]Source
List concatenation.
Generic mapping example using user-defined concrete generators