Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save hyone/1053185 to your computer and use it in GitHub Desktop.
Save hyone/1053185 to your computer and use it in GitHub Desktop.
4clojure #65 - Black Box Testing
;; hyone's solution to Black Box Testing
;; https://4clojure.com/problem/65
(defn seq-type [coll]
(let [base (empty coll)]
(cond
(= base {}) :map
(= base #{}) :set
(= base '()) (if (reversible? coll) :vector :list))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment