[CLJ-1097] node-seq for clojure.zip Created: 29/Oct/12 Updated: 29/Oct/12 |
|
| Status: | Open |
| Project: | Clojure |
| Component/s: | None |
| Affects Version/s: | Release 1.5 |
| Fix Version/s: | None |
| Type: | Enhancement | Priority: | Minor |
| Reporter: | Timothy Baldridge | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | clojure.zip | ||
| Attachments: |
|
| Patch: | Code and Test |
| Description |
|
Many times it's easier to get to a zipper node via (first (filter pred ...)) instead of manually walking the tree via next/up/down. Other times it's easier to process certain nodes via filter & map instead of again, walking the tree. This patch provides a single function called node-seq that uses zip/next to generate a lazy-seq of nodes. Tests provide two examples. |