Safe Haskell | Safe |
---|---|

Language | Haskell2010 |

Pure Haskell functions. These tend to be more general than the equivalents in ATS.

- derangement :: Integral a => Int -> a
- hsIsPrime :: Integral a => a -> Bool
- hsDoubleFactorial :: Integral a => a -> a
- hsChoose :: Integral a => a -> a -> a
- hsTotient :: Integral a => a -> a
- hsTau :: Integral a => a -> Int
- hsTotientSum :: Integral a => a -> a
- hsLittleOmega :: Integral a => a -> Int
- hsIsPerfect :: Integral a => a -> Bool
- hsSumDivisors :: Integral a => a -> a
- hsCatalan :: Integral a => a -> a
- hsFibonacci :: Integral a => Int -> a
- hsFactorial :: Integral a => a -> a
- hsJacobi :: Integral a => a -> a -> a

# Useful functions

derangement :: Integral a => Int -> a Source #

See here.

λ:> fmap derangement [0..10] :: [Integer] [1,0,1,2,9,44,265,1854,14833,133496,1334961]

# Functions exported for testing and benchmarking

hsDoubleFactorial :: Integral a => a -> a Source #

hsTotientSum :: Integral a => a -> a Source #

hsLittleOmega :: Integral a => a -> Int Source #

hsIsPerfect :: Integral a => a -> Bool Source #

hsSumDivisors :: Integral a => a -> a Source #

hsFibonacci :: Integral a => Int -> a Source #

hsFactorial :: Integral a => a -> a Source #