• (consume func initial-context)

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:37 top

(defn consume [func initial-context]
  (loop [context initial-context
         acc []]
    (let [[result new-context] (apply func [context])]
      (if (not result)
        [acc new-context]
      (recur new-context (conj acc result))))))
Vars in clojure.contrib.pprint.utilities/consume: conj defn let loop not
Used in 0 other vars

Comments top

No comments for consume. Log in to add a comment.