On Sat, 9 Sep 2006, Brian Hulley wrote: > > > negate (expNat 4 2) > > > > > > because this would free the ^ symbol for some more widely > > > applicable use, and would also make the particular choice of > > > exponentiation operator more explicit > > > > Agreed, though I'd want expt to be part of a typeclass > > (possibly multi-parameter to get exp:: Integral a => a -> > > Natural -> a as an instance?). > > Yes, a typeclass for exp would be ideal (and a newtype for Natural).
What about (expNat exponent basis) ? This argument order is more convenient for partial application. Cf. http://www.haskell.org/pipermail/haskell-cafe/2006-April/015329.html _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe