ninetynine-1.3.0: Ninety-Nine Haskell Problems
CopyrightCopyright (C) 2021 Yoo Chung
LicenseGPL-3.0-or-later
Maintainerdev@chungyc.org
Safe HaskellSafe-Inferred
LanguageGHC2021

Problems.P39

Description

Part of Ninety-Nine Haskell Problems. Some solutions are in Solutions.P39.

Synopsis

Documentation

primesR :: Integral a => a -> a -> [a] Source #

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]

primes :: Integral a => [a] Source #

Construct the list of all prime numbers.

Examples

>>> take 5 primes
[2,3,5,7,11]