logoalt Hacker News

fc417fc802 • today at 8:39 PM • 0 replies • view on HN

Yes, and that's exactly what's being described in the linked essay. They generally work by using a counter as state. Forking is typically implemented by incrementing the top bits while fetching the next number from a given stream is implemented by incrementing the bottom bits. Thus skipping forward and backward in a given stream is O( 1 ).