Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module Haskel where
- pow2 b e
- | (e == 1) = b
- | (e `mod` 2 == 0) = pow2(b * b) (e `div` 2)
- | otherwise = b * (pow2 (b * b) ((e - 1) `div` 2))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement