i have range piping enum.into ([]) throws warning. what's wrong here?
iex(1)> 1..5 |> enum.into ([]) warning: piping function call without parentheses... after adding parentheses
iex(2)> (1..5) |> enum.into ([]) warning: piping function call without parentheses...
the problem space around argument enum.into. it's not interpreted parenthesis function call, rather grouping mechanism around 1 of arguments. space not allowed between function name , arguments.
1..5 |> enum.into ([]) same 1..5 |> enum.into(([])) (if fill missing parenthesis compiler complaining about). wanted 1..5 |> enum.into([]), correct call, compiler not complain about.
Comments
Post a Comment