Created
August 29, 2013 15:19
-
-
Save bostonou/6379446 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 =? | |
[a b] | |
(= a b)) | |
(defn channel=? | |
[a c] | |
(thread (=? a (<!! c)))) | |
(def partial=? (partial =? 10)) | |
(let [c (chan) | |
chan-result (channel=? 10 c)] | |
; do some stuff... | |
(let [_ (thread (>!! c 10)) ; give channel=? it's last arg | |
partial-result (partial=? 10)] ; give partial=? it's last arg | |
{:channel (<!! chan-result) | |
:partial partial-result})) | |
; => {:channel true :partial true} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment