
1 Jul
2013
1 Jul
'13
2:53 p.m.
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. Thanks again. Now I also understand why Prelude> ( $ 4 ) sqrt 2.0 because it is equivalent to Prelude> (\x -> x 4) sqrt 2.0 Marc