<div dir="ltr"><div><div><div><div>I'm a beginner, too, but I look at it this way: (+) is the uncurried, unsectioned add function. You use (+) when it happens to be convenient or necessary to use it the way you'd use functions that you give names, e.g. passing it to another function the way you do with map.<br>
<br></div>A section, on the other hand, is a partial application of a function, and the way to remember what happens to the input it takes is to notice which operand is inside the parentheses of the section.<br><br></div>
( / 8) is the function that, given n, returns n / 8.<br></div>(8 / ) is the function that, given n, returns 8 / n.<br><br></div>It only really makes a difference when the function in question isn't commutative.<br></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jul 1, 2013 at 1:03 PM, Marc Gorenstein <span dir="ltr"><<a href="mailto:marc.gorenstein@gmail.com" target="_blank">marc.gorenstein@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Brandon, Darren, and Michael,<br>
<br>
Thanks for you responses, but I'm still confused.<br>
<br>
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>
<br>
I get that. But look at the following: We now have a prefix operator with<br>
the input on the "wrong" side.<br>
<br>
Prelude> let div_by_eight = ( / 8 )<br>
Prelude> div_by_eight 4<br>
0.5<br>
<br>
Why should ( / 8) 4 = 0.5?<br>
<br>
<br>
Thanks again,<br>
<br>
Marc<br>
<br>
<br>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank">http://www.haskell.org/mailman/listinfo/beginners</a><br>
</blockquote></div><br></div>