Charles could you please confirm this: “Whereas, takes1Param requires 1 parameters a function that…
Tracy-Gregory Gilmore
54

I’m also quite confused by the sentence just before the one you highlighted as well.

takes2Params : Int -> Int -> String
takes2Params num1 num2 =
-- do something
takes2Param is a function that requires 2 parameters, an Int and another Int.

Based on what we have learned about type signatures in Elm (i.e., that “parentheses are always implied to the right” and “every function is curried in Elm”), I would think that the correct way to phrase this (with the implied parentheses shown) would be

takes2Params : Int -> (Int -> String)

takes2Param is a function that takes a single parameter of type Int and returns a function that takes a single parameter of type Int and returns a String.”

UPDATE:

I see now that Charles’ explanation was indeed correct. Technically, takes2Param really only takes one param and returns a function, but as his example shows (and as we have seen in previous examples), you can just pass two Int parameters and have the takes2Param return a String. This makes sense to me now.

Like what you read? Give Austin Wood a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.