Quiet@Remove["Global`*"];
$HistoryLength=2;
SetDirectory[NotebookDirectory[]];

nextSimpleIter[x_]:=(1./25)(x^2+25x-2)

Nest[nextSimpleIter,-2,50]

NestList[(2./(#))&,1,100]

nextX[x_]:=(x^2)-x+1

Nest[nextX,0,10]

f[x_]:=(1/2)*(x+(8/(x^2)));
NestWhileList[f,5.,Abs[#1-#2]>0.001&,2]
Length[%]

Quiet@Remove["Global`*"];
sol=Solve[{k*a+q==f[a],k*x+q==f[x]},{k,q}][[1]]
Solve[0==k*xNext+q/.sol,xNext]

f[x_]:=5.*Exp[-x]-6;
x0=3;
a=-1;
f[x0]*f[a]<0
xNext[x_]:=((x f[a]-a f[x])/(f[a]-f[x]));
test[x_]:=Abs[f[x]]>(10^(-4));
NestWhileList[xNext,x0,Abs[f[#]]>(10^(-4))&]
NestWhileList[xNext,x0,test]
ListPlot[%]

Quiet@Remove["Global`*"];
f[x_]:=5.*Exp[-x]-6;
x0=3;
a=-1;
f[x0]*f[a]<0;
nextInterval[{x1_,x2_}]:={x1,0.5*(x2+x1)}/;f[x1]*f[0.5*(x2+x1)]≤0;
nextInterval[{x1_,x2_}]:={0.5*(x2+x1),x2}/;f[x2]*f[0.5*(x2+x1)]≤0;
NestWhileList[nextInterval,{a,x0},Abs[f[Mean[#]]]>(10^(-4))&];
NestWhileList[nextInterval,{a,x0},Abs[f[#.{0.5,0.5}]]>(10^(-4))&];
NestWhileList[nextInterval,{a,x0},Abs[f[((#[[1]]+#[[2]])/2)]]>(10^(-4))&];