In [1]:
from ipytangle import tangle
jar = tangle(cookies=3, calories=(150, lambda cookies: cookies * 50))
jar
When you eat
cookies
cookies, you consumecalories
calories.cookies == 0
Come on, have a cookie!cookies == 1
You can't eat just one! Buh, too many cookies.
In [19]:
jar.cookies = 1