Skip to content

Instantly share code, notes, and snippets.

@burhanloey
Created March 31, 2016 05:09
Show Gist options
  • Save burhanloey/321d45e3ff02e169b95b6f1f7912ab10 to your computer and use it in GitHub Desktop.
Save burhanloey/321d45e3ff02e169b95b6f1f7912ab10 to your computer and use it in GitHub Desktop.
Example for using .then() method in SoundCloud API in ClojureScript
;; (.then (.then (.connect js/SC)
;; (fn [] (.get js/SC "/me")))
;; (fn [me] (js/alert (str "Hello, " (.-username me)))))
(.. (.connect js/SC)
(then #(.get js/SC "/me"))
(then #(js/alert (str "Hello, " (.-username %)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment