start haskell

This commit is contained in:
Dan Ballard 2011-10-21 14:18:31 -07:00
parent 20a89cc870
commit eb0954b57a
1 changed files with 4 additions and 0 deletions

4
e3/e3.hs Normal file
View File

@ -0,0 +1,4 @@
factor n divisor
| (divisor == n-1 || n == 1) = [n]
| rem n divisor == 0 = (factor (fromIntegral n/divisor) 2) ++ (factor divisor 2)
| otherwise = factor n (divisor+1)