[Haskell-cafe] why is Prelude.^ so convoluted?

blaetterrascheln at web.de blaetterrascheln at web.de
Thu Jul 29 10:10:04 EDT 2004


> x ^ n = if even n then y*y else y*y*x where y = x ^ (n `quot` 2)
x ^ n | n>0 = if even n then y*y else y*y*x where y = x ^ (n `quot` 2)

________________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt neu bei WEB.DE FreeMail: http://freemail.web.de/?mc=021193



More information about the Haskell-Cafe mailing list