In the foldr documentation the function getAges
it says it returns a List String.
However in the commented return value we have:
-- getAges users == [28,19,33]
Which would suggest the actual return type is List Int.
It's fairly harmless but might be enough to cause folks a head scratch moment like it did for me.
We can either type the example code as List Int or change the commented return code as:
-- getAges users == ["28","19","33"]
In the foldr documentation the function
getAgesit says it returns a
List String.However in the commented return value we have:
-- getAges users == [28,19,33]Which would suggest the actual return type is
List Int.It's fairly harmless but might be enough to cause folks a head scratch moment like it did for me.
We can either type the example code as
List Intor change the commented return code as:-- getAges users == ["28","19","33"]