Recursive containers

by Ricardo Fernández Serrata

Version 1 (April 16, 2021)

Download (2 downloads)

This shows how recursion can generate data with exponential growth, similar to the Ackermann F.

n is proportional to the recursive depth.

++cont is used so that the stack doesn't blow up instantly. If cont is used directly, it would turn into an infinite recursive loop.

index=0 and value=slice(cont, 0, -1)
is equivalent to
index=null and value=slice(cont, 1)
But both are reversed versions of each other.

index=cont is exactly equal to index=0, so there's no point in using recursive indexing.

Depending on your choice, {cont} could be an array (default) or dictionary (d = 1)

Array Set is boring because it has either constant or linear growth rate regardless of configuration. The trivial configuration value=cont blows up the stack, just like the other blocks

3.0 average rating from 1 reviews

5 stars
4 stars
3 stars
2 stars
1 star

Rate and review within the app in the Community section.