M2 icon indicating copy to clipboard operation
M2 copied to clipboard

No recursion limit error for functions of one argument

Open d-torrance opened this issue 1 year ago • 4 comments

Compare the following:

i1 : f = () -> f();

i2 : g = x -> g x;

i3 : h = (x,y) -> h(x,y);

i4 : i = (x,y,z) -> i (x,y,z);

i5 : f()
stdio:1:11:(3):[301]: error: recursion limit of 300 exceeded

i6 : g 0 -- hangs
  C-c C-cstdio:2:11:(3):[1]: error: interrupted

i7 : h(0,0)
stdio:3:14:(3):[301]: error: recursion limit of 300 exceeded

i8 : i(0,0,0)
stdio:4:16:(3):[301]: error: recursion limit of 300 exceeded

d-torrance avatar Sep 24 '24 14:09 d-torrance