for i in [1, 2, 3]:
x = increment(i)
y = add(i, x)
Running this code will memoize a bunch of calls to `increment` and `add` in a way that recognizes that the output of the call to `increment` is the second input to the call to `add` (behind the scenes, they point to the same saved object). Then, if you call `storage.similar(x, y)`, you'll see a message like this: a0 = Q() # input to computation; can match anything
a1 = Q() # input to computation; can match anything
x = increment(a=a0)
y = add(a=a1, b=x)
result = storage.df(x, y)
and a table like this:
If this is something you're interested in, I can probably give a more detailed comparison if I find the time.