implementing map in terms of the Seq protocol