TestHaskell-0.1.0.0
Safe HaskellNone
LanguageHaskell2010

Lib

Synopsis

Documentation

fibN :: (Num a, Enum a, Ord a) => a -> [a] Source #

Calculate a list of Fibonacci numbers of length len.

Example: >>> fibN 9 [1,1,2,3,5,8,13,21,34]

fibBetter :: Integer -> [Integer] Source #

Better version, recursively construct a list.

Example: >>> fibBetter 8 [1,1,2,3,5,8,13,21]

fibZip :: Int -> [Integer] Source #

Short version, using zip with the same list twice.

Example: >>> fibZip 10 [1,1,2,3,5,8,13,21,34,55]

goldenRatio :: Int -> Double Source #

Calculate the golden ratio.

Example: >>> goldenRatio 4 1.6180555555555556