r/functionalprogramming • u/zoomT • Jun 30 '26
Data Structures Persistent Iterators: Bridging Persistent Data Structures and Iterator-Based Programming (PLDI 2026)
https://github.com/GJDuck/libfpp
13
Upvotes
View all comments
Show parent comment
3
u/zoomT Jun 30 '26
Thanks. We had to implement some optimizations to achieve reasonable speed, including CMAs, destructive update, and a dirty flag system (details are in the paper).
For a taste of the code, here is the main part of the
it.erase()operation, and here is the main part ofit.insert(elem). These are zippers over finger trees, which is switch-case hell.