Elm - How to reduce lists
It’s very easy to reduce lists in Elm, here is an example using Elm REPL.
> List.foldl String.append "" ["a", "b", "c"]
"cba"
This one is a clean equivalent of that dirty one: String.append "c" (String.append "b" (String.append "a" ""))
Same one but going from the right:
> List.foldr String.append "" ["a", "b", "c"]
"abc"
Tested with Elm 0.19.1