f[x_]:=Sin[x]/x

Plot[f[t],{t,-2Pi,2Pi}]

f[0]

f[0.]

Limit[f[t],t->0]

f[0]:=Limit[f[t],t->0]

f[0]

f[0.]

?f

f[0]=Limit[f[t],t->0]

?f

(* HORRIBLE THING TO DO *)

f[0.]:=Limit[f[t],t->0]

f[0.]

ϵ=10^.2;

f[x_/;Abs[x]≤ϵ]:=1

Plot[f[t],{t,-2Pi,2Pi}]

Clear[f]

f[x_]:=
Block[{t},
Limit[Sin[t]/t,t->x]
]

?f

Plot[f[t],{t,-3Pi,2Pi}]

f[0]

f[x_]:=f[x]=
Block[{t},
Limit[Sin[t]/t,t->x]
]

Plot[f[t],{t,-.1Pi,.2Pi}]

?f

Clear[f]

fact[n_]:=n fact[n-1]

fact[6]

fact[1]=1;

fact[6]

fact[6.]

factN[n_Integer]:=n factN[n-1]

factN[6.]

fact[6.5]

Head[3.]

fact[x_Real]:=...

fact[x_/;0≤x≤1]:=1

fact[3.]

fact[3.5]

f[-4.]

fact[x_/;x<0]:=-fact[-x]

fact[-3.5]

?fact

fact[n_Integer]:=(n+1)!

fact[6]

?fact

ff[x_/; x>2]:=x^2

ff[x_/;x<4]:=x

gg[x_/;x<4]:=x

gg[x_/; x>2]:=x^2

Plot[ff[t],{t,1,5}]

Plot[gg[t],{t,1,5}]

?ff

?gg

Plot3D[Cos[x]Sin[y]/y,{x,-Pi,2Pi},{y,0,2Pi}]

g[x_,y_]:=Cos[x]Sin[y]/y

Plot3D[g[x,y],{x,-Pi,2Pi},{y,0,2Pi}]

aux={};

aux=Join[{3.14},aux]

aux

f[x_]:=
(aux=Join[{x},aux];
x^2)

aux={};

f[2]

aux

f[2.]

aux

f["paolo"]

aux

aux={};
Plot[f[t],{t,1,3Pi}]
Length[aux]

ListPlot[aux]

square[x_]:=x^2

ListPlot[square[Sort[aux]]]

ListPlot[
Map[{#,square[#]}&,Sort[aux]]
]

Clear[g]

g[x_,y_]:=
(aux=Join[{x,y},aux];
Cos[x]Sin[y]/y)

aux={};

g[2.,1]

aux

g0[x_,y_]:=Cos[x]Sin[y]/y

g[x_,y_]:=
(aux=Join[{{x,y}},aux];
Cos[x]Sin[y]/y)

?g

aux={};

g[2.,1];g[12.,1];g[2.,1.];

aux

aux={};
Plot3D[g[x^2,y],{x,-Pi,.5Pi},{y,-Pi,2Pi},PlotRange->All]
Length[aux]

Take[aux,5]

aux[[1]]

g0[aux[[10,1]],aux[[10,2]]]

Apply[g0,aux[[10]]]

g0[Apply[Sequence,aux[[10]]]]

?Graphics3D

Graphics3D[{White,
Point[
Join[aux[[10]],{Apply[g0,aux[[10]]]}]
]
}
]

Graphics3D[
Map[
{White,Point[
Join[#,{Apply[g0,#]}]
]}&,
aux
]
]

h[x_,y_]:=x+y

{
h[1,2],
h[2,2],
h[2,{2}],
h[Pi,{1,2}],
h[{1,2},{1,2}],
h[{1,2},{1,2,3}],
h[Pi,E,1,2]
}

h[x_,x_]:=x

{
h[1,2],
h[2,2],
h[2,{2}],
h[Pi,{1,2}],
h[{1,2},{1,2}],
h[{1,2},{1,2,3}],
h[Pi,E,1,2]
}

h[x_,{1,2}]:={a,b}[[Random[Integer]+1]]

h[_,{1,2}]:={a,b}[[Random[Integer]+1]]

?h

{
h[1,2],
h[2,2],
h[2,{2}],
h[Pi,{1,2}],
h[{1,2},{1,2}],
h[{1,2},{1,2,3}],
h[Pi,E,1,2]
}