NestList[f,x0,5]

{Sin[5],Sin[5.]}

{Head[5.],Head[5],Head["5"],Head[5+5I],Head[{1,1}]}

Remove["Global`*"]//Quiet;
derivative[{t_,y_}]:=((-y)/(1+t));
tStart=0.;
tEnd=20;
yStart=10;
Manipulate[
nSteps=10*(2^i);
Δt=((tEnd-tStart)/nSteps);
step[point:{t_,y_}]:={t+Δt,y+Δt*derivative[point]};
solution=NestList[step,{tStart,yStart},nSteps];
pltEuler=ListPlot[solution,PlotRange->All,PlotStyle->{PointSize[0.01],Red}]
,{i,0,10,1}];

SolutionbyDSolve=y[t]/.DSolve[{D[y[t],t]==((-y[t])/(t+1)),y[0]==10},y[t],t][[1]];

pltDsolve=Plot[SolutionbyDSolve,{t,0,20},PlotRange->Full];

SolutionbyDSolve=y[t]/.DSolve[{D[y[t],t]==((-y[t])/(t+1)),y[0]==10},y[t],t][[1]];
pltDsolve=Plot[SolutionbyDSolve,{t,0,20},PlotRange->Full];
Manipulate[
tStart=0.;
tEnd=20;
yStart=10;
nSteps=10*(2^i);
Δt=((tEnd-tStart)/nSteps);
step[point:{t_,y_}]:={t+Δt,y+Δt*derivative[point]};
solution=NestList[step,{tStart,yStart},nSteps];
pltEuler=ListPlot[solution,PlotRange->All,PlotStyle->{PointSize[0.01],Red}];
Show[pltDsolve,pltEuler],{i,0,10,1}
];

NestList[Cos,0,5]

NestList[g,x0,5]

Remove["Global`*"]//Quiet;
Solve[-y[xi]==y'[xi]*(x-xi),x]//Simplify;
f[x_]:=100x-Exp[x];
Plot[f[x],{x,0,10}];
xNext[xPrevious_]:=xPrevious-((f[xPrevious])/(f'[xPrevious]));
xStart=10.;
NestList[xNext,xStart,10]
%/.x_Real->{x,f[x]}

test[x_]:=Abs[f[x]]>0.001;
NestWhileList[xNext,xStart,test]

xNext[xPrevious_]:=xPrevious-((f[xPrevious])/(f'[xPrevious]));
NestWhileList[xNext,xStart,Abs[f[#]]>0.001&]
%/.x_Real:>{x,f[x]}

Remove["Global`*"]//Quiet;
f=Cos;
xStart=1.;
test[x_]:=Abs[f[x]-x]>(10^(-5));
NestWhileList[f,xStart,test]

NestWhileList[Cos,1.,Abs[Cos[#]-#]>(10^(-5))&]

?/;

Remove["Global`*"]//Quiet;
f=Sin;
nextInterval[{a_,b_}]:={a,a+0.5(b-a)}/;f[a]*f[a+0.5(b-a)]<0;
nextInterval[{a_,b_}]:={a+0.5(b-a),b}/;f[b]*f[a+0.5(b-a)]<0;
intervalStart={1.,1.3Pi};
test[{a_,b_}]:=b-a>(10^(-3));
NestWhileList[nextInterval,intervalStart,test]