Skip to content

Instantly share code, notes, and snippets.

@athos
Created May 29, 2016 10:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save athos/6006c14298181fe4316c0e57591122d4 to your computer and use it in GitHub Desktop.
Save athos/6006c14298181fe4316c0e57591122d4 to your computer and use it in GitHub Desktop.
(defn include? [xs ys]
(let [ys' (frequencies ys)]
(reduce (fn [_ [e n]]
(or (some->> (ys' e) (<= n))
(reduced false)))
true
(frequencies xs))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment