Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Documentation
An abstract type for primes.
It will only ever hold a valid prime, along with its zero-based index.
deconstruct :: Prime int -> (int, Int) Source #
Given a Prime, give back its value and index as a tuple.
maybePrime :: Integral int => int -> Maybe (Prime int) Source #
If a given number is prime, give it back wrapped as such.
indexedPrimes :: Integral int => [Prime int] Source #
List of indexed primes.