[Haskell-beginners] Still confused

Ryan Bell ryan.l.bell at gmail.com
Mon Jul 1 20:19:10 CEST 2013


Does it help to think of it like algebra?

let x = 4
where x / 8


On Mon, Jul 1, 2013 at 2:03 PM, Marc Gorenstein
<marc.gorenstein at gmail.com>wrote:

> Hi Brandon, Darren, and Michael,
>
> Thanks for you responses, but I'm still confused.
>
> Here are two examples of operator sections. The first takes the infix
> operator
> / and turns it into a prefix operator.
>
> Prelude> let eight_div_by = ((/) 8 )
> Prelude> eight_div_by 4
> 2.0
>
> I get that. But look at the following:  We now have a prefix operator with
> the input on the "wrong" side.
>
> Prelude> let div_by_eight = ( / 8 )
> Prelude> div_by_eight 4
> 0.5
>
> Why should ( / 8) 4 = 0.5?
>
>
> Thanks again,
>
> Marc
>
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20130701/8851d069/attachment.htm>


More information about the Beginners mailing list