News for hackers. Stuff that matters.
Re:Learn you a Haskell: Zippers by jewbacca on Wednesday November 03, 2010 @06:25PM (#1866784)
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?
Re:Learn you a Haskell: Zippers by maxtilford on Wednesday November 03, 2010 @07:03PM (#1866885)
Re:Learn you a Haskell: Zippers by eru on Wednesday November 03, 2010 @10:07PM (#1867319)
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.