I'm logging the a
and b
values of a foldl
.
words = ["mate", "bro", "bruv"]
sum2 = List.foldl
(\a b ->
Debug.log(toString <| a)
Debug.log(toString <| b)
a
) "guv" words
It works as expected, but I can't understand the output:
"mate": <function>
"guv": "mate"
"bro": <function>
"mate": "bro"
"bruv": <function>
"bro": "bruv"
Why is it outputting a
as a <function>
, and what is it outputting b
as a:b
?