<div dir="ltr">On Mon, Jul 1, 2013 at 2:03 PM, Marc Gorenstein <span dir="ltr"><<a href="mailto:marc.gorenstein@gmail.com" target="_blank">marc.gorenstein@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Here are two examples of operator sections. The first takes the infix operator<br>
/ and turns it into a prefix operator.<br>
<br>
Prelude> let eight_div_by = ((/) 8 )<br>
Prelude> eight_div_by 4<br>
2.0<br></blockquote><div><br></div><div style>Yes. A section is just this conversion of an infix operator to a prefix function, but with one parameter carried along with it. You can supply it on either side as appropriate; (/ 8) is the same as (\x -> x / 8) which in turn is the same as (\x -> (/) x 8), whereas (8 /) is (\x -> 8 / x) is (\x -> (/) 8 x). Note that it must be *inside* the parentheses to be a section; if it's outside, then it's a normal function (not operator!) parameter.</div>
<div><br></div></div>-- <br><div dir="ltr"><div>brandon s allbery kf8nh sine nomine associates</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a> <a href="mailto:ballbery@sinenomine.net" target="_blank">ballbery@sinenomine.net</a></div>
<div>unix, openafs, kerberos, infrastructure, xmonad <a href="http://sinenomine.net" target="_blank">http://sinenomine.net</a></div></div>
</div></div>