Skip to content
forked from trivio/zipper

Zipper data structure for python. Described by Huet, ported from clojure.

Notifications You must be signed in to change notification settings

swagile1/zipper

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zipper Build Status

A datastructure, first described by Huet, is used to traverse and manipulate immutable trees. This library is a port of the zipper implementation found in Clojure.

Usage

The zipper module provides several functions for creating a Loc object which represents the current focal point in the tree.

>>> import zipper
>>> top = zipper.list([1, [2, 3], 4])

>>> print top.down().right().node()
[2,3]

>>> print top.down().right().down().node()
2

>>> print top.down().right().down().replace(0).root()
[1, [0, 3], 4]

About

Zipper data structure for python. Described by Huet, ported from clojure.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%