power2 :: Integer -> Integer
power2 exponent

 | exponent < 0 = error "Negative exponent."
 | otherwise    = iter exponent double 1
 
 where
 
 double :: Integer -> Integer
 double integer = integer * 2
power2 :: Integer -> Integer
power2 exponent

 | exponent < 0 = error "Negative exponent."
 | otherwise    = iter exponent double 1
 
 where
 
 double :: Integer -> Integer
 double integer = integer * 2
power2 exponent

 | exponent < 0 = error "Negative exponent."
 | otherwise    = iter exponent double 1
 
 where
 
 double :: Integer -> Integer
 double integer = integer * 2