{- | Description: List of prime numbers Copyright: Copyright (C) 2021 Yoo Chung License: GPL-3.0-or-later Maintainer: dev@chungyc.org Part of Ninety-Nine Haskell "Problems". Some solutions are in "Solutions.P39". -} module Problems.P39 (primesR, primes) where import qualified Solutions.P39 as Solution -- | Given a range of integers by its lower and upper limit, inclusive, -- construct a list of all prime numbers in that range. -- -- === Examples -- -- >>> primesR 10 20 -- [11,13,17,19] primesR :: Integral a => a -> a -> [a] primesR :: forall a. Integral a => a -> a -> [a] primesR = a -> a -> [a] forall a. Integral a => a -> a -> [a] Solution.primesR -- | Construct the list of all prime numbers. -- -- === Examples -- -- >>> take 5 primes -- [2,3,5,7,11] primes :: Integral a => [a] primes :: forall a. Integral a => [a] primes = [a] forall a. Integral a => [a] Solution.primes