Re:Verb-Noun vs. Noun-Verb
by the_gipsy on Wednesday October 16, 2019 @06:53PM
(#21276898)
I have found myself using pipes many times in Elm, because they make the code so much more readable. Now I understand why!
I haven't seen an autocomplete that works on pipes. But with a good type system, it is technically possible to list all compatible functions that take "noun" as first parameter.
Sometimes you supply partially applied functions (also with pipes in noun->verb order) and that's not so easy to match:
noun
|> verb1
|> (otherNoun >> verb2)
|> etc
But perhaps even functions that take "noun" as nth parameter could be suggested.
I haven't seen an autocomplete that works on pipes. But with a good type system, it is technically possible to list all compatible functions that take "noun" as first parameter.
Sometimes you supply partially applied functions (also with pipes in noun->verb order) and that's not so easy to match:
noun |> verb1 |> (otherNoun >> verb2) |> etc
But perhaps even functions that take "noun" as nth parameter could be suggested.