fold_map implementation
change fold_map to standard signature
Merge pull request #2 from struktured/master

fold_map implementation (thanks to @struktured)