Map multiple functions over a single data item
- by Linus Norton
I'm in the process of learning Scala and I came across a scenario today where I need to map multiple functions over a single piece of data and wondered if there was a formal name for this. It sort of feels like the inverse of map.
I'm not sure this is the correct way of expressing it, but this is what I did:
dmap(x: Object, fns: List[Function]) = fns.map(_(x))
Is there a built in way to do something similar? Is there a formal name for this function?