
14 Nov
2012
14 Nov
'12
3:20 p.m.
* Henning Thielemann
An ZipList-like Applicative instance for Data.Map would be nice. I have an application where I like to write liftA3 f amap bmap cmap meaning Map.intersectionWith ($) (Map.intersectionWith f amap bmap) cmap
But I cannot complete the instance implementation because there is no sensible definition for 'pure' for Data.Map. :-(
You can lift Map like this: data ZipMap k a = Pure a -- a "Map" that maps every possible key to 'a' | Zip (Map k a) Roman