• (pick n)
Return the next value of stream argument n inside a stream
transformer. When used inside of defst, the name of the stream
argument can be used instead of its index n.

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/stream_utils.clj:149 top

(defn pick
  "Return the next value of stream argument n inside a stream
   transformer. When used inside of defst, the name of the stream
   argument can be used instead of its index n."
  [n]
  (fn [streams]
    (let [[v ns] (stream-next (streams n))]
      (if (nil? ns)
	[nil nil]
	[v (assoc streams n ns)]))))
Vars in clojure.contrib.stream-utils/pick: defn fn let nil? ns
Used in 0 other vars

Comments top

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