factory-0.2.1.1: Rational arithmetic in an irrational world.

Safe HaskellSafe-Inferred
LanguageHaskell98

Factory.Math.Primes

Contents

Description

AUTHOR
Dr. Alistair Ward
DESCRIPTION
Exports a common interface for implementations of prime-number generators.

Synopsis

Types-classes

class Algorithmic algorithm where Source

Defines the methods expected of a prime-number generator.

Methods

primes Source

Arguments

:: (NFData i, Ix i, Integral i) 
=> algorithm 
-> [i]

Returns the constant, infinite, list of primes.

Functions

primorial :: (Algorithmic algorithm, NFData i, Ix i, Integral i) => algorithm -> [i] Source

mersenneNumbers :: (Algorithmic algorithm, Integral i) => algorithm -> [i] Source