@11011110 The bit-twiddling generation of the successor fibbin number can be done much simpler:
def fibbinary():
x = 0
while True:
yield x
y = ~(x >> 1)
x = (x - y) & y

@efroach76 Four operations instead of my eight: definitely a big improvement. I've updated this in the post (with credit to you, of course).

Sign in to participate in the conversation

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!