Replace mapAnd with both

Fixes #1.