The ability for Haskell Function to take portions of arguments, to define the rest of the function to work with an already supplied expression.

Example

Underlying Logic

t (\x -> \y -> x + y)

Functions that can be curried will have the form where each function with multiple inputs returns a new function based of the next input.

Built-in Methods

  • We can curry to convert Tuple argument into seperate arguments
  • We can uncurry to convert all arguments into a tuple argument
curry :: ((a,b) -> c) -> a -> b -> c
member :: Eq t => (t, [t]) -> Bool
>>> curry member
curry member :: Eq t => t -> [t] -> Bool
uncurry :: (a->b->c) -> (a,b) -> c
sum' :: Num a => a -> a -> a
>>> uncurry sum'
uncurry sum' :: Num c => (c, c) -> c