File: memory.hs

package info (click to toggle)
haskell-primes 0.2.1.0-12
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 80 kB
  • sloc: haskell: 128; makefile: 2
file content (10 lines) | stat: -rw-r--r-- 226 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
-- ghc -O2 --make memory
-- ./memory 6 1000000 +RTS -s

import System.Environment
import Data.Numbers.Primes

main :: IO ()
main = do [m,n] <- (map read . take 2) `fmap` getArgs
          print $ (wheelSieve m :: [Int]) !! n