pprint-anon-func

clojure.contrib.pprint

  • (pprint-anon-func alis)

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/contrib/pprint/dispatch.clj:273 top

(defn pprint-anon-func [alis]
  (let [args (second alis)
        nlis (first (rest (rest alis)))]
    (if (vector? args)
      (binding [*symbol-map* (if (= 1 (count args)) 
                               {(first args) "%"}
                               (into {} 
                                     (map 
                                      #(vector %1 (str \% %2)) 
                                      args 
                                      (range 1 (inc (count args))))))]
        ((formatter-out "~<#(~;~@{~w~^ ~_~}~;)~:>") nlis))
      (pprint-simple-code-list alis))))
Vars in clojure.contrib.pprint/pprint-anon-func: formatter-out pprint-simple-code-list binding defn let vector?
Used in 0 other vars

Comments top

No comments for pprint-anon-func. Log in to add a comment.