Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
core.async trouble
(defn fetch-user [username]
(let [ch (chan)]
(letrpc [user (get-user-info username)] ;; shoreleave remote's letrpc macro
(>! ch user)
(close! ch))
(defn display-user-info [username]
(go (let [u (<! (fetch-user username))]
(log u) ;; prints out a channel instead of a user map
(display-user-info "wei")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.