Created
March 30, 2010 11:36
-
-
Save anonymous/349024 to your computer and use it in GitHub Desktop.
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
(defprotocol State | |
(gets [state & path])) | |
(defn make-state [] | |
(let [state (atom {:blah 12})] | |
(reify State | |
(gets [& path] | |
(get-in @state path))))) | |
(def a (make-state)) | |
(gets a :blah) | |
should return 12 | |
but returns : java.lang.IllegalArgumentException: No single method: gets of interface: cara.schema.state.State found for function: gets of protocol: State (NO_SOURCE_FILE:143) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment