Simple Fractals in Haskell.

This posting was inspired by the ideas in ‘Composing Fractals’ by Mark P Jones. Fractals are generated by applying a function to the result of applying that function to the result of applying that function… Haskell has a very simple way of expressing this iterative function application:

i.e. iterate takes a function, that takes an ‘a’ and produces an ‘a’, along with an initial ‘a’ – the seed value. The function is then repeatedly applied ‘forever’ giving an infinite list of [a].

Of course we can’t really use all of an infinite list so we apply Haskell’s ‘take’ Read More


ˆ Back To Top