1.2.0 permalink Arrow_down_16x16
  • (consume-while 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:45 top

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

Comments top

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