composition :: Ord b => Map b c -> Map a b -> Map a c
composition bc ab = flip mapMaybe ab $ flip lookup bc
Which has O(|ab| * log |bc|) performance. It's not particularly hard to write, but it does feel like a primitive-ish operation, and it's not obvious to me whether there's a faster implementation.
Other name suggestions
- (.)
- chain
- compose