Mercurial > hg > Papers > 2015 > atton-thesis
view paper/src/numberCount1.hs @ 78:6f699b37dc55
Add original number count
author | Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 18 Feb 2015 12:26:17 +0900 |
parents | |
children |
line wrap: on
line source
generator :: Int -> [Int] generator x = [1..x] numberFilter :: [Int] -> [Int] numberFilter xs = filter @ {\underline {isPrime}} $ _1 $ @ xs count :: [Int] -> Int count xs = length xs numberCount :: Int -> Int numberCount x = count (numberFilter (generator x))