Created
April 10, 2011 16:31
-
-
Save svdberg/912494 to your computer and use it in GitHub Desktop.
how do we handle static methods?
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
; (to-html (number-a-sequence (map track-to-str (top-tracks lastfm-user-name (lastfm-api-key)))))) | |
(defmacro with-error-handling | |
[func return_on_ok return_on_fail & args] | |
`(let [result# (apply func ~args)] | |
(if (.isSuccessful result#) | |
~return_on_ok | |
~return_on_fail))) | |
;(with-error-handling (fn [a b] (Library/addArtist a b)) "OK" "FAIL" "Murk" (get-session)) | |
;how do we handle Library/addArtists? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment