Hacker News new | ask | show | jobs
by jewbacca 5709 days ago
I've had an investigation on the backburner for a while on whether there's a zipper-like structure for representing 2D grids (eg, a game board). I feel like this may be a blind alley, because a grid would have cycles and no inherent ordering. Can anybody shed some light on this?
2 comments

Look into Okasaki's "Purely Functional Datastructures" for an example on how to handle cycles. He talks about double ended queues, which can obviously interpreted as a graph with a single cycle.