Re: [elm-discuss] Newbie syntax confusion in Elm

2016-09-26 Thread Duane Johnson
Yes, you're correct. Consider the case where you want to make a function that returns a function. Perhaps you'd write: ```elm makeMeAFunction : Int -> (Int -> Int) makeMeAFunction i = (\j -> i) ``` If you call (makeMeAFunction 1), the result would be a function that takes any integer and returns

Re: [elm-discuss] Newbie syntax confusion in Elm

2016-09-26 Thread Sebastián Alvarez
It's because partial application. You can pass the first int and Elm will return a function which needs just one int (the second). Using that returned function with the second int, finally will return the third int. -- You received this message because you are subscribed to the Google Groups "El

[elm-discuss] Newbie syntax confusion in Elm

2016-09-26 Thread suttlecommakevin
I have some confusion with the syntax in Elm, fully realizing that they may have been modeled after Haskell and/or other languages. Here's an example: add : Int -> Int -> Int Why wouldn't this be: add : Int, Int -> Is it because of partial application or currying? -- You received this