|
|
|
|
|
by redbar0n
942 days ago
|
|
Since the type is inferred, why can't the module name by convention be inferred from the data type in pipe operations? So instead of: ["a", "b", "c"]
|> List.append "d"
|> List.append "e"
|> List.append "f" You could have: ["a", "b", "c"]
|> append "d"
|> append "e"
|> append "f" Since Roc knows that the type returned from each function is a List. |
|
An important note is that any module could expose an append function that has the same interfaces as `List.append`, so that could easily lead to confusion.