Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@hiredman
Last active August 30, 2019 23:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hiredman/05af7cef14991cfea802cf83fb82d178 to your computer and use it in GitHub Desktop.
Save hiredman/05af7cef14991cfea802cf83fb82d178 to your computer and use it in GitHub Desktop.
user=> (require '[clojure.core.async :as async])
nil
user=> (def ^java.net.Socket s nil)
#'user/s
user=> (defn f [] (async/go (.getOutputStream s)))
#'user/f
user=> (defn f [] (async/go (try (.getOutputStream s) (catch Exception e nil))))
#'user/f
user=>
user=> (require '[clojure.core.async :as async])
nil
user=> (set! *warn-on-reflection* true)
true
user=> (def s nil)
#'user/s
user=> (defn f [] (async/go (try (.getOutputStream ^java.net.Socket s) (catch Exception e nil))))
#'user/f
user=>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment