implement suggestion #199

Tentative pull. functional, with doc and test.
I suggest we remove this line and the similar one in mapkeys now.