zipper
Cleaner way to update nested structures
Say I have got following two case classes: case class Address(street: String, city: String, state: String, zipCode: Int)[详细]
2023-01-19 21:52 分类:问答How do I format a tree so that it works with Clojure's zipper?
I am creating trees of s-expressions for a genetic programming problem, and need to alter parts of the trees during the evolution process. I came across the Clojure zipper function that seems like it[详细]
2023-01-19 05:44 分类:问答Effects of changing a node in a binary tree
Suppose I want to change the orange node in the following tree. So, the only other change 开发者_如何学编程I\'ll need to make is in the left pointer of the green node.[详细]
2022-12-26 01:24 分类:问答How well do zippers perform in practice, and when should they be used?
I think that the zipper is a beautiful idea; it elegantly provides a way to walk a list or tree and make what appear to be local updates in a functional way.[详细]
2022-12-24 04:24 分类:问答