profunctor-optics-0.0.2: A compact optics library compatible with the typeclasses in profunctors.

Safe HaskellNone
LanguageHaskell2010

Data.Tuple.Optic

Synopsis
  • curried :: Iso (a -> b -> c) (d -> e -> f) ((a, b) -> c) ((d, e) -> f)
  • swapped :: Iso (a, b) (c, d) (b, a) (d, c)
  • associated :: Iso (a, (b, c)) (d, (e, f)) ((a, b), c) ((d, e), f)
  • t21 :: Lens (a, b) (a', b) a a'
  • t22 :: Lens (a, b) (a, b') b b'
  • t31 :: Lens (a, b, c) (a', b, c) a a'
  • t32 :: Lens (a, b, c) (a, b', c) b b'
  • t33 :: Lens (a, b, c) (a, b, c') c c'
  • t41 :: Lens (a, b, c, d) (a', b, c, d) a a'
  • t42 :: Lens (a, b, c, d) (a, b', c, d) b b'
  • t43 :: Lens (a, b, c, d) (a, b, c', d) c c'
  • t44 :: Lens (a, b, c, d) (a, b, c, d') d d'
  • t51 :: Lens (a, b, c, d, e) (a', b, c, d, e) a a'
  • t52 :: Lens (a, b, c, d, e) (a, b', c, d, e) b b'
  • t53 :: Lens (a, b, c, d, e) (a, b, c', d, e) c c'
  • t54 :: Lens (a, b, c, d, e) (a, b, c, d', e) d d'
  • t55 :: Lens (a, b, c, d, e) (a, b, c, d, e') e e'

Documentation

curried :: Iso (a -> b -> c) (d -> e -> f) ((a, b) -> c) ((d, e) -> f) Source #

Curry a function.

>>> (fst ^. invert curried) 3 4
3

swapped :: Iso (a, b) (c, d) (b, a) (d, c) Source #

Swap sides of a product.

associated :: Iso (a, (b, c)) (d, (e, f)) ((a, b), c) ((d, e), f) Source #

Iso defined by left-association of nested tuples.

t21 :: Lens (a, b) (a', b) a a' Source #

t22 :: Lens (a, b) (a, b') b b' Source #

t31 :: Lens (a, b, c) (a', b, c) a a' Source #

t32 :: Lens (a, b, c) (a, b', c) b b' Source #

t33 :: Lens (a, b, c) (a, b, c') c c' Source #

t41 :: Lens (a, b, c, d) (a', b, c, d) a a' Source #

t42 :: Lens (a, b, c, d) (a, b', c, d) b b' Source #

t43 :: Lens (a, b, c, d) (a, b, c', d) c c' Source #

t44 :: Lens (a, b, c, d) (a, b, c, d') d d' Source #

t51 :: Lens (a, b, c, d, e) (a', b, c, d, e) a a' Source #

t52 :: Lens (a, b, c, d, e) (a, b', c, d, e) b b' Source #

t53 :: Lens (a, b, c, d, e) (a, b, c', d, e) c c' Source #

t54 :: Lens (a, b, c, d, e) (a, b, c, d', e) d d' Source #

t55 :: Lens (a, b, c, d, e) (a, b, c, d, e') e e' Source #