5 ms·
|> isn't proper partial function application. It can only apply a single parameter and you can't store a piped-into function in a variable the way you can a par
by skrebbel 8y ago
|> isn't proper partial function application. It can only apply a single parameter and you can't store a piped-into function in a variable the way you can a partially applied function in eg Haskell. Eg the following won't work:
splitname = name |> String.split
splitname.(" ")
Also, it's a stretch to call & currying. It's shorthand syntax for making an anonymous function. If & is currying, then the following JS code is also currying:
const cube = a => Math.pow(a, 3)
Elixir doesn't have currying or partial function application any more than JS or C# do. If your definition of "functional" requires these features then Elixir isn't functional (and that's fine).