view paper/src/numberCount1.hs @ 92:0354d3693324 default tip

Added tag paper_final for changeset 6a12eb22be8c
author Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
date Sun, 01 Mar 2015 13:08:51 +0900
parents 6f699b37dc55
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))