Bidirectional iterator
ID: bidirectional-iterator
An iterator with forward and backward cursor movement. With the cursor between elements,
next crosses and returns the element to the right, and prev crosses and returns the element to the left. Memoizing a forward-only source's consumed prefix supports arbitrary backward travel over that prefix without replaying source effects. The required history storage grows with the farthest explored position, even if the current cursor later moves backward. New to topics? Read the docs here!