2+2

f[z_] = z^2 + I

Nest[f,0,10]

NestList[f,0,10]

FilledJulia[maxits_] :=
Compile[{x, y, {v, _Integer}},
Module[{z = x + I*y, k = 0.},
While[k < maxits &&Abs[z] < 2, {z = z^2; k ++}];
k]
];

f[z_] = z^2;
DensityPlot[FilledJulia[x,y,20], {x, -2, 2}, {y, -2, 2}, PlotPoints -> 100, Mesh -> False]

FillJulia =
Compile[{x,y,{m, _Integer}},
Module[{z = x + I * y,n = 0, k = 1.},
If[Abs[z] > 10, n = m];
While[n < m && k == 1, 
If[Abs[z] > 10  || Abs[z] < .1 , k = 0,
z = z^2 ] ;
n++];
n]
];

DensityPlot[FillJulia[x,y,600], {x, -1.5,1.5}, {y, -1.5, 1.5}, PlotPoints -> 100, Mesh -> False, ColorFunction -> "Rainbow"]

FillJulia =
Compile[{x,y,{m, _Integer}},
Module[{z = x + I * y,n = 0, k = 1.},
If[Abs[z] > 10, k = 0];
While[n < m && k == 1, 
If[Abs[z ] > 10, k = 0,
z = z^2  + I] ;
n++];
n]
];

Timing[DensityPlot[FillJulia[x,y,1000], {x, -1.5,1.5}, {y, -1.5, 1.5}, PlotPoints -> 500, Mesh -> False, ColorFunction -> "Rainbow"]]

?ColorFunction

FillJulia =
Compile[{x,y,{m, _Integer}},
Module[{z = x + I * y,n = 0, k = 1.},
If[Abs[z] > 10, k = 0];
While[n < m && k == 1, 
If[Abs[z ] > 10, k = 0,
z = z^2  - .12256 + .74486 I] ;
n++];
n]
];

WhichFixedPoint =
Compile[{x,y,{m, _Integer}},
Module[{z = x + I * y,n = 0, k = 1.},
If[Abs[z] > 10, n = m];
While[n < m && k == 1, 
If[Abs[z ] > 10 , k = 0, If[Abs[z- .1] < 1/1000, k = 2, 
If[Abs[z+ .1] < 1/1000, k = 4,z = - z(z^2 - 1.01) ]]] ;
n++];
k]
];

Solve[z ==-z(z^2 - 1.01), z]

Flatten[%]

z/. %

2 Abs[%]

2 Abs[0.9472135954999579`-0.223606797749979` I]

DensityPlot[WhichFixedPoint[x,y,600], {x, -1.5,1.5}, {y, -1.5, 1.5}, PlotPoints -> 100, Mesh -> False, ColorFunction -> "BlueGreenYellow"]

WhichFixedPoint =
Compile[{x,y,{m, _Integer}},
Module[{z = x + I * y,n = 0, k = 1.},
If[Abs[z] > 10, n = m];
While[n < m && k == 1, 
If[Abs[z ] > 10 , k = 0, If[Abs[z] < 1/1000, k = 2, 
z = z^2 - 1 ]] ;
n++];
k]
];