Last active
December 17, 2015 06:19
-
-
Save spoon16/5564170 to your computer and use it in GitHub Desktop.
Trying to figure out why line 13 is throwing an `ArityException` instead of yielding `"hello world"`
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 slice | |
([] | |
(slice "hello world")) | |
([v] | |
(-slice v))) | |
(defprotocol Pizza | |
(-slice [this])) | |
(extend-type String | |
Pizza | |
(-slice [this] (do this))) | |
(slice "works") ;; works | |
(slice) ;; hello world |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fixed with @gfredericks help.