Here is a complete Elm script that puts a bunch of tuples in an HTML element <ul>.
import Html exposing (ul, li, text)
import List exposing (map)
values = [(1,2,3), (4,5,6), (7,8,9)]
main =
ul [] (values |> map (\t -> li [] [text(toString(t))]))
I like to use |>other higher order operators where possible, but with relatively deep nesting tin the expression above, I could not find a good way to express this line. Are there higher order operators in Elm that would make lambda \tunnecessary?
I understand that it would be more readable to use lambda, but it was interesting what combinations should be used here, given that the call toStringis inside the list.
source
share