[Haskell-beginners] Still confused

Marc Gorenstein marc.gorenstein at gmail.com
Mon Jul 1 20:42:05 CEST 2013


> 
> 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.
> 
> -- 
> brandon s allbery kf8nh                               sine nomine associates
>


Hi Brandon (and others),

Thanks very much. I'm no longer confused. I can see that a Section is a 
special case that turns a binary infix  operator turns into a single-parameter 
prefix function. The equivalence to a lambda abstraction makes it clear.

Thanks,

Marc






More information about the Beginners mailing list