kachayev / fn.py

Functional programming in Python: implementation of missing features to enjoy FP
Other
3.35k stars 204 forks source link

HAMT dicts #52

Open radix opened 10 years ago

radix commented 10 years ago

HAMT dicts have been implemented in Python, at least twice as far as I know:

https://github.com/jml/perfidy/tree/master/perfidy

https://github.com/alex/optimizer-model/blob/master/optimizer/utils/persistent_dict.py

so you may not have to implement it yourself to include them in fn.py (or at least not start from scratch).

The implementations are under the MIT and BSD licenses, respectively. The authors may be willing to relicense to ASL.

radix commented 10 years ago

so it looks like there's a currently well-maintained set of persistent data structures in Python, including list (vector), map and set: https://pypi.python.org/pypi/pyrsistent/

maybe there's no reason for fn.py to have its own versions of these data structures since that project exists.