Created
January 25, 2013 12:24
-
-
Save swannodette/4634047 to your computer and use it in GitHub Desktop.
bag.cljs
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
(deftype Bag [store] | |
Object | |
(add [_ x] (.push store x)) | |
(print [_] (.log js/console store))) | |
(defn bag [arr] (Bag. arr)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment