Updated: 11/5/2005; 6:07:54 PM.
Chris Double's Radio Weblog
        

Wednesday, October 27, 2004

Zipper in Scheme. A comp.lang.scheme posting from Oleg describe how to implement Zipper in Scheme. The implementation uses delimited continuations (ie. shift-reset or splitter).
Zipper is a very handy data structure that lets us replace an item
deep in a complex data structure, e.g., a tree or a term, without any
mutation. The resulting data structure will share as much of its
components with the old structure as possible. The old data structure
is still available (which can be handy if we wish to 'undo' the
operation later on). Zipper is essentially an `updateable' and yet
pure functional cursor into a data structure.


2:16:00 PM      

© Copyright 2005 Chris Double.
 
October 2004
Sun Mon Tue Wed Thu Fri Sat
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            
Sep   Nov



Click here to visit the Radio UserLand website.

Listed on BlogShares

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.