はじめました
Haskellの勉強も兼ねて、Project Euler はじめました。
解答をさらしていきます。
まずは1問目。
http://projecteuler.net/index.php?section=problems&id=1
FizzBuzzのバリエーションかな。
main = print $ euler001 [1..999] euler001 :: [Int] -> Int euler001 = sum . map judge judge :: Int -> Int judge i | (mod i 3 == 0) || (mod i 5 == 0) = i | otherwise = 0