On Mon, Sep 5, 2011 at 10:19 PM, Thomas Schilling <span dir="ltr"><<a href="mailto:nominolo@googlemail.com">nominolo@googlemail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>a >>= \p -> f <$> b -- 'free p' and 'free b' disjoint</div>
<div> --></div><div>((\p -> f) <$> a) <*> b</div></div></blockquote>
<div><br></div></div><div>Will there also be an optimisation for some sort of simple patterns? I.e., where we could rewrite this to: </div><div><br></div><div> liftA2 (\pa pb -> f ...) a b</div><div><br></div><div>I think I remember someone saying that the one-at-a-time application of <*> inhibits certain optimisations.</div>
</div></div></blockquote><div><br></div><div>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?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div class="gmail_quote"><div>I find (a << b) confusing. The intended semantics seem to be "effect a", then "effect b", return result of "a". </div></div></div></blockquote><div>
<br></div><div>Sorry, I didn't know that << doesn't exist. I meant an operator with the meaning of <* .</div><div><br></div><div>Sebastian</div></div>