hlint suggestion

This commit is contained in:
Yann Esposito (Yogsototh) 2011-11-10 10:58:24 +01:00
parent ee8a5460c3
commit 1174079776

5
014.hs
View file

@ -2,7 +2,10 @@ import Data.List
type YInt = Int
collatz :: YInt -> YInt
collatz n = if n<0 then 1 else if even n then n `quot` 2 else 3*n+1
collatz n
| n<0 = 1
| even n = n `quot` 2
| otherwise = 3*n+1
-- The l `seq` is necessary to not be lazy (non-strict)
-- And not to fill the stack