curry -package:dimensional

Convert an uncurried function to a curried function.

Examples

>>> curry fst 1 2
1
curry converts an uncurried function to a curried function.

Examples

>>> curry fst 1 2
1
Curry a function on strict pairs.
curry converts an uncurried function to a curried function.
curry converts an uncurried function to a curried function.

Examples

>>> curry fst 1 2
1
Convert between an uncurried function and a curryed function.
Not on Stackage, so not searched. Curry types
Provides combinators for currying and uncurrying functions over arbitrary vinyl records.
Curry a type-level list. In pseudo (dependent-)Haskell:
Curry xs y = foldr (->) y xs
Tuple curry/uncurry.
Converts an uncurried function to a curried function.
Curries a function expecting one RGB parameter.
Convert an uncurried function on Sigma to a curried one. Together, currySigma and uncurrySigma witness an isomorphism such that the following identities hold:
id1 :: forall a (b :: a ~> Type) (c :: Sigma a b ~> Type).
(forall (p :: Sigma a b). SSigma p -> c @ p)
-> (forall (p :: Sigma a b). SSigma p -> c  p)
id1 f = uncurrySigma a b c (currySigma a b c f)

id2 :: forall a (b :: a ~> Type) (c :: Sigma a b ~> Type).
(forall (x :: a) (sx :: Sing x) (y :: b  x). Sing (WrapSing sx) -> Sing y -> c  (sx :&: y))
-> (forall (x :: a) (sx :: Sing x) (y :: b  x). Sing (WrapSing sx) -> Sing y -> c  (sx :&: y))
id2 f = currySigma a b c (uncurrySigma a b @c f)