3 ms·
Actually the "true" implementation is printElements arrayOfStrings = traverse putStrLn arrayOfStrings main = printElements ["Hello", "World"] but the
by tome 9y ago
Actually the "true" implementation is
printElements arrayOfStrings = traverse putStrLn arrayOfStrings
main = printElements ["Hello", "World"]
but the difference between map and traverse is sufficient for your point to still hold water.
- yawaramin 9y agoI think we would actually use `mapM_` rather than `traverse`.