extended pmap with kw args
using closures to test error state
Merge pull request #3715 from amitmurthy/amitm/pmap

extended pmap with kw args