abstract `map` better

Conflicts:
	kore/src/main/scala/org/kframework/kore/helpers.scala
Merge pull request #1171 from cos/feature/better-map-abstraction

abstract `map` better