I have the following code:
f[a_, b_] := {a, b};
Block[
{
n := 1,
l := {{x, y}}
},
Do[
Print[n];
l := f[{1/n, 1/(n + 1)}, l];
n := n + 1;
Print[n],
5
]
]
which produces
1
and
$RecursionLimit::reclim2: Recursion depth of 1024 exceeded during evaluation of n+1. >>
Actually I want to do more complicated things in f with the elements {1,1/2), {1/2,1/3), {1/3,1/4}... and so on. What i dont undestand is why all of a sudden this one here complains about recursion.
I am using 10.2 on PC / OS/X and it happens in a fresh notebook???