GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing clojure.github.io — clojure.walk - Clojure v1.12.4 API documentation
Clojure v1.12.4 API
Namespaces
Other Versions
Clojure Home
API for clojure.walk - Clojure v1.12.4 (stable)by Stuart SierraFull namespace name: clojure.walk OverviewThis file defines a generic tree walker for Clojure data structures. It takes any data structure (list, vector, map, set, seq), calls a function on every element, and uses the return value of the function in place of the original. This makes it fairly easy to write recursive search-and-replace functions, as shown in the examples. Note: "walk" supports all Clojure data structures EXCEPT maps created with sorted-map-by. There is no (obvious) way to retrieve the sorting function. Public Variables and Functionskeywordize-keysfunctionUsage: (keywordize-keys m) Recursively transforms all map keys from strings to keywords.Added in Clojure version 1.1 Source macroexpand-allfunctionUsage: (macroexpand-all form) Recursively performs all possible macroexpansions in form.Added in Clojure version 1.1 Source postwalkfunctionUsage: (postwalk f form) Performs a depth-first, post-order traversal of form. Calls f on each sub-form, uses f's return value in place of the original. Recognizes all Clojure data structures. Consumes seqs as with doall.Added in Clojure version 1.1 Source postwalk-demofunctionUsage: (postwalk-demo form) Demonstrates the behavior of postwalk by printing each form as it is walked. Returns form.Added in Clojure version 1.1 Source postwalk-replacefunctionUsage: (postwalk-replace smap form) Recursively transforms form by replacing keys in smap with their values. Like clojure/replace but works on any data structure. Does replacement at the leaves of the tree first.Added in Clojure version 1.1 Source prewalkfunctionUsage: (prewalk f form) Like postwalk, but does pre-order traversal.Added in Clojure version 1.1 Source prewalk-demofunctionUsage: (prewalk-demo form) Demonstrates the behavior of prewalk by printing each form as it is walked. Returns form.Added in Clojure version 1.1 Source prewalk-replacefunctionUsage: (prewalk-replace smap form) Recursively transforms form by replacing keys in smap with their values. Like clojure/replace but works on any data structure. Does replacement at the root of the tree first.Added in Clojure version 1.1 Source stringify-keysfunctionUsage: (stringify-keys m) Recursively transforms all map keys from keywords to strings.Added in Clojure version 1.1 Source walkfunctionUsage: (walk inner outer form) Traverses form, an arbitrary data structure. inner and outer are functions. Applies inner to each element of form, building up a data structure of the same type, then applies outer to the result. Recognizes all Clojure data structures. Consumes seqs as with doall.Added in Clojure version 1.1 Source Copyright 2007-2025 by Rich Hickey
Logo & site design by Tom Hickey.
Clojure auto-documentation system by Tom Faulhaber. |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |