powers in haskell code example
Example: Haskell power
-- typically for integers
(^) :: (Num a, Integral b) => a -> b -> a
-- typically for rationals
(^^) :: (Fractional a, Integral b) => a -> b -> a
-- typically for floating-point numbers
(**) :: Floating a => a -> a -> a