1.2.0 permalink Arrow_down_16x16

map-passing-context

clojure.contrib.pprint.utilities

  • (map-passing-context func initial-context lis)

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/utilities.clj:26 top

(defn map-passing-context [func initial-context lis]
  (loop [context initial-context
         lis lis
         acc []]
    (if (empty? lis)
      [acc context]
    (let [this (first lis)
          remainder (next lis)
          [result new-context] (apply func [this context])]
      (recur new-context remainder (conj acc result))))))
Vars in clojure.contrib.pprint.utilities/map-passing-context: conj defn empty? let loop
Used in 0 other vars

Comments top

No comments for map-passing-context. Log in to add a comment.