[Haskell-cafe] Unresolved overloading error

David House dmhouse at gmail.com
Sun Apr 1 10:58:29 EDT 2007

On 31/03/07, Bryan Burgers <bryan.burgers at gmail.com> wrote:
> As a matter of style suggestion, it might make 'binom' more clear if
> you use 'div' as an infix operator:
> > binom n j = (fac n) `div` ( fac j * fac (n - j) )

You can even drop the first set of parentheses:

binom n r = fac n `div` (fac r * fac (n - r))

Remember that prefix function application has a higher precedence than
pretty much anything else.

-David House, dmhouse at gmail.com

More information about the Haskell-Cafe mailing list