let modSquared (c : Complex) = c.Real * c.Real + c.Imaginary * c.Imaginary
let rec loop z iterations =
if (modSquared z >= 4.0) then iterations
elif iterations = maxIteration then 0
else loop ((z * z) + c) (iterations + 1)
for y in seq{-1.2..0.15..1.2} do
for x in seq{-2.0..0.07..0.9} do
printf "%c" " .:-;!/>)|&IH%*#".[mandelbrot(Complex(x, y)) &&& 15]