Falsely Failed Recursion with List Operation

Something’s not working the way it seems like it should.

When I created a recursive function g that introduces another function f that uses a list operation, where the recurrence f(g(n-1)) appears

I saw an error claiming that the recurrence is endless, sometimes before the computation, sometimes after reaching the recurrence limit. Apparently it claims that the recursion doesn’t reach a base case when the input is a number, and claims to fail after reaching the recurrence limit when the input is a list.

But I expected the recurrence to end. If I tweak the recurrence a bit, by changing the base value or changing the operation done to it, or by inlining the two functions, I get different results.

Here’s the link to the page: Glitched recursion with list operation | Desmos

And here are some screenshots:

Thanks for your interest in flagging these issues. Bug reports for the Desmos calculator can be reported at support.desmos.com. When doing so it’ll be helpful to share a graph link instead of a screenshot.