uncurry -package:optics-core

uncurry converts a curried function to a function on pairs.

Examples

>>> uncurry (+) (1,2)
3
>>> uncurry ($) (show, 1)
"1"
>>> map (uncurry max) [(1,2), (3,4), (6,8)]
[2,4,8]
Caution: See unzip.
Convert a curried function to a function on strict pairs.
uncurry converts a curried function to a function on pairs.
uncurry converts a curried function to a function on pairs.

Examples

>>> uncurry (+) (1,2)
3
>>> uncurry ($) (show, 1)
"1"
>>> map (uncurry max) [(1,2), (3,4), (6,8)]
[2,4,8]
Converts a curried function to a function on a triple.
Uncurries a function expecting three r, g, b parameters.
Caution: See unzip.
mothers little helpers for to much curry
Convert a curried function on Sigma to an uncurried one. Together, currySigma and uncurrySigma witness an isomorphism. (Refer to the documentation for currySigma for more details.)
Like uncurryType, except on a kind level.
Split a type signature by the arrows on its spine. For example, this:
forall a b. (a ~ b) => (a -> b) -> Char -> ()
would split to this:
(a ~ b, [a -> b, Char, ()])
Like uncurry but using Prod instead of pairs. Can be thought of as a family of functions:
uncurryn :: r a -> Prod '[] a
uncurryn :: (f a -> r a) -> Prod '[f] a
uncurryn :: (f a -> g a -> r a) -> Prod '[f, g] a
uncurryn :: (f a -> g a -> h a -> r a) -> Prod '[f, g, h] a
⋮
Uncurry first parameter of n-ary function