Improved project structure.
This commit is contained in:
9
haskell/e016.hs
Normal file
9
haskell/e016.hs
Normal file
@@ -0,0 +1,9 @@
|
||||
import Data.Char
|
||||
|
||||
myPow :: Integral a => a -> a -> a
|
||||
myPow x 0 = 1
|
||||
myPow x 1 = x
|
||||
myPow x n = x*(myPow x (n-1))
|
||||
|
||||
--digitSum :: Integral a => a -> a
|
||||
digitSum x = sum $ map digitToInt $ show x
|
||||
Reference in New Issue
Block a user