On 2006-09-11, Henning Thielemann <[EMAIL PROTECTED]> wrote: > > 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
I don't see anything in that message supporting either argument order. Personally, I mostly use exponentials in the context of the fourier transform. Although it could be expressed by either varying the exponent or the base, I find varying the exponent to be far more natural. Consider also the specialization we have of power: exp, with a fixed base, but not square, with a fixed exponent. -- Aaron Denney -><- _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe