Created
August 31, 2012 13:07
-
-
Save puredanger/3552458 to your computer and use it in GitHub Desktop.
sub= defn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn sub= | |
"Checks that all keys and vals in m1 are in m2 (but m2 can have extra stuff)" | |
[o1 o2] | |
(if (and (map? o1) (map? o2)) | |
(every? identity (map (fn [[k v]] (sub= v (k o2))) o1)) | |
(= o1 o2))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment