[Haskell-cafe] The percent operator

Brent Yorgey byorgey at gmail.com
Fri Nov 16 10:40:11 EST 2007

On Nov 16, 2007 9:44 AM, PR Stanley <prstanley at ntlworld.com> wrote:

> Hi
> I understand 2%4 will construct a fraction in Haskell. I've tried
> this in GHCI but got an error message. Is there such an operator in
> Prelude and if so how is it applied?
> Cheers,
> Paul

It's in Data.Ratio.

Prelude> :m +Data.Ratio
Prelude Data.Ratio> 2%4

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20071116/f6de412a/attachment.htm

More information about the Haskell-Cafe mailing list