0

Is it possible to use |> with multiple arguments?

sum = (a, b)-> 
  a + b

10, 12 |> sum # "Unexpected ','" 
sum(10,12) # this is fine
10 |> sum 12, _ # this works, but is there a better way? 
muyueh
  • 1,018
  • 13
  • 16

1 Answers1

1

You can't pipe |> in more than one argument at a time.

10 |> sum 12 works fine however.

PS. you could write sum = (+)

gkz
  • 416
  • 3
  • 5