• (reject p dist)
Return the distribution that results from rejecting the values from
dist that do not satisfy predicate p.

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/probabilities/monte_carlo.clj:74 top

(defn reject
  "Return the distribution that results from rejecting the values from
   dist that do not satisfy predicate p."
  [p dist]
  (fn [rs]
    (let [[r nrs] (dist rs)]
      (if (p r)
	(recur nrs)
	[r nrs]))))
Vars in clojure.contrib.probabilities.monte-carlo/reject: defn fn let
Used in 0 other vars

Comments top

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