Skip to content

Instantly share code, notes, and snippets.

@moznion
Created July 29, 2012 12:54
Show Gist options
  • Save moznion/3198527 to your computer and use it in GitHub Desktop.
Save moznion/3198527 to your computer and use it in GitHub Desktop.
スタートHaskell 2 第2回目演習 関数合成
g :: [a] -> [a]
g = tail . tail . tail . tail
f :: [Int] -> [Int]
f = take 10 . map (*3) . filter even
sqrtSums :: Int
sqrtSums = (1+) . length . takeWhile (<1000) . scanl1 (+) $ map sqrt [1..]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment