Fix infinite recursion in map and foldl
Merge pull request #2 from chrisavl/master

Fix infinite recursion in map and foldl