Elm type annotations has return type
Here is an add function that takes 2 and 4 and turns these into "24". :)
add : Int -> Int -> String
add x y = (toString x ++ toString y)
x = add 2 4
The first line is a type annotation that lists the first argument, second argument and return type in that order.
Tweet