Improved project structure.

This commit is contained in:
2017-06-01 14:50:23 +02:00
parent 5e06b03248
commit 89f0d81598
25 changed files with 2 additions and 0 deletions

8
haskell/e014.hs Normal file
View File

@@ -0,0 +1,8 @@
collatz :: Integral a => a -> [a]
collatz 1 = 1:[]
collatz x
| even x = x:collatz (quot x 2)
| odd x = x:collatz (3*x + 1)
main = do
putStrLn . show $ maximum $ zip (map (length . collatz) [1..1000000]) [1..]