squash potential space leaks by using strict foldl
Merge pull request #291 from raichoo/master

squash potential space leaks