News for hackers. Stuff that matters.
Re:Functors, Applicatives, and Monads in Pictures (2013) by dwenzek on Thursday September 24, 2015 @03:52AM (#10270386)
A function has ONE parameter and ONE return value. The trick is that these parameters and returned values may be tuples or functions themselves.

So we can have a function which takes a single parameter which is a tuple :

    function_name :: (Param1Type, Param2Type) -> ReturnType
Or we can have a function which takes a single parameter and returns another function:

    function_name :: Param1Type -> (Param2Type -> ReturnType)
Using implied operator precedence, the later is written:

    function_name :: Param1Type -> Param2Type -> ReturnType
And has to be distinguished from a function which takes a function as parameter:

    function_name :: (Param1Type -> Param2Type) -> ReturnType

There are no comments on this comment yet.