
5 Sep
2011
5 Sep
'11
5:41 p.m.
On 5 September 2011 15:49, Sebastian Fischer
On Mon, Sep 5, 2011 at 10:19 PM, Thomas Schilling
wrote: a >>= \p -> f <$> b -- 'free p' and 'free b' disjoint --> ((\p -> f) <$> a) <*> b
Will there also be an optimisation for some sort of simple patterns? I.e., where we could rewrite this to: liftA2 (\pa pb -> f ...) a b I think I remember someone saying that the one-at-a-time application of <*> inhibits certain optimisations.
liftA2 is defined via one-at-a-time application and cannot be redefined because it is no method of Applicative. Do you remember more details?
Good point. I can't find the original post, so I don't know what exactly the issue was (or maybe I'm misremembering). -- Push the envelope. Watch it bend.