Clear[Eternity,x];
Eternity[x_]:=Eternity[x];
Clear[EmptyQ];
EmptyQ[{}] := True;
EmptyQ[x_List] := False;
EmptyQ[x_] := Print["Argument to EmptyQ must be a list."];
Clear[length,list,f,g]
Function[f,
Function[list,If[EmptyQ[list],0,
1+f[Rest[list]]]]]
[Function[g,
Function[list,If[EmptyQ[list], 0,
1 +
g[Rest[list]]]]][Eternity]]
Clear[length,list,f,g]
Function[f,
Function[list,If[EmptyQ[list],0,
1+f[Rest[list]]]]]
[Function[g,Function[list,If[EmptyQ[list], 0,
1 +
g[Rest[list]]]]][Eternity]]
Here are 2 versions of the same anonymous function. The only
difference between them is that in the second version Function[g....
starts on a new line.
One of them works. The other generates a syntax error.