In Haskell, you can use the $ operator to clear bits of code, eliminating the need for parens.
Does this operator support vli or something like that?
I can define it myself, but I was hoping that it was something built-in.
Here's how it works:
import Html import List exposing (map, foldr) datas = [("a", 1), ("b", 2), ("c", 3)] {--} ($) : (a -> b) -> (a -> b) ($) ab = ab infixr 0 $ --} main = {-- replace all these parens Html.text (toString (foldr (++) "" (map fst datas))) --} Html.text $ toString $ foldr (++) "" $ map fst datas
functional-programming elm
Conrad.Dean
source share