Created
July 29, 2012 12:53
-
-
Save moznion/3198526 to your computer and use it in GitHub Desktop.
スタートHaskell 2 第2回目演習 関数適用
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
g :: [a] -> [a] | |
g xs = tail $ tail $ tail $ tail xs | |
f :: [Int] -> [Int] | |
f xs = take 10 $ map (*3) $ filter even xs | |
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