In Haskell, you can use the $
operator to clean up bits of code, removing the need for parens.
Does elm support this operator, or something like it?
I can define it myself but I was hoping that this 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)
($) a b = a b
infixr 0 $
--}
main =
{-- replace all these parens
Html.text (toString (foldr (++) "" (map fst datas)))
--}
Html.text $ toString $ foldr (++) "" $ map fst datas