Back

postwalk-demo (clj)

(source)

function

(postwalk-demo form)
Demonstrates the behavior of postwalk by printing each form as it is walked. Returns form.

Examples

clojure/core.typed
(deftest keywordize-keys-test
  (is-tc-e #(keywordize-keys {"a" 1 "b" 2})
           :requires [[clojure.walk :refer [keywordize-keys]]]))

(deftest postwalk-demo-test
  (is-tc-e #(postwalk-demo [[1 2] [3 4 [5 6]] [7 8]]) [-> Any]           
           :requires [[clojure.walk :refer [postwalk-demo]]]))
typedclojure/typedclojure
(deftest keywordize-keys-test
  (is-tc-e #(keywordize-keys {"a" 1 "b" 2})
           :requires [[clojure.walk :refer [keywordize-keys]]]))

(deftest postwalk-demo-test
  (is-tc-e #(postwalk-demo [[1 2] [3 4 [5 6]] [7 8]]) [-> t/Any]           
           :requires [[clojure.walk :refer [postwalk-demo]]]))
retrogradeorbit/bootleg
(ns bootleg.namespaces
  (:require [bootleg.utils :as utils]
            [bootleg.enlive :as enlive]
            [bootleg.selmer :as selmer]
            [bootleg.markdown :as markdown]
            [bootleg.mustache :as mustache]
            [bootleg.asciidoc :as asciidoc]
            [bootleg.html :as html]
            [bootleg.yaml :as yaml]
            [bootleg.json :as json]
            [bootleg.edn :as edn]
            [bootleg.glob :as glob]
            [bootleg.file :as file]
            [bootleg.minify :as minify]
            [hickory.convert]
            [hickory.hiccup-utils]
            [hickory.render]
            [hickory.select]
            [hickory.utils]
            [hickory.zip]
            [net.cgrand.enlive-html :as enlive-html]
            [net.cgrand.jsoup]
            [net.cgrand.reload]
            [net.cgrand.tagsoup]
            [net.cgrand.xml]
            [selmer.filter-parser]
            [selmer.filters]
            [selmer.middleware]
            [selmer.node]
            [selmer.parser]
            [selmer.tags]
            [selmer.template-parser]
            [selmer.util]
            [selmer.validator]
            [edamame.core :refer [parse-string]]
            [sci.core :as sci]
            [clojure.walk]
            [clojure.zip]
            [clojure.tools.cli]
            ))

   'clojure.walk {
                  'walk clojure.walk/walk
                  'postwalk clojure.walk/postwalk
                  'prewalk clojure.walk/prewalk
                  'postwalk-demo clojure.walk/postwalk-demo
                  'prewalk-demo clojure.walk/prewalk-demo
                  'keywordize-keys clojure.walk/keywordize-keys
                  'stringify-keys clojure.walk/stringify-keys
                  'prewalk-replace clojure.walk/prewalk-replace
                  'postwalk-replace clojure.walk/postwalk-replace
                  }
thi-ng/demos
(ns ex03.walker
  (:require
   [clojure.xml :as xml]
   [clojure.walk :as walk :refer [prewalk]]))

(postwalk-demo data)
(prewalk-demo data)