<div dir="ltr">I guess it depends on the final use cases... you could use currying to partially evaluate some stuff ready, locked and loaded as it were but the example you have given shows to distinct functions pres1 and pred2.<div><br></div><div>I guess the short answer is "yes" but it depends on how you do it!<br><br>:)<br>Sean</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 16 November 2015 at 11:44, Mark Carter <span dir="ltr"><<a href="mailto:alt.mcarter@gmail.com" target="_blank">alt.mcarter@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Suppose I want to use an argument twice, as for example in the expression:<br>
(\x -> (pred1 x) and (pred2 x))<br>
<br>
Is there a shorter way of doing this?<br>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners</a><br>
</blockquote></div><br></div>