Project Euler Problem 065
import Data.Char import Data.Ratio ans1 :: Int ans1 = sum $ map digitToInt $ show $ numerator $ foldr1 (\x y -> x + 1/y) $ take 100 $ 2:concatMap (\i -> [1,2*i,1]) [1..] -- 272 main :: IO () main = print ans1