Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
(defn resolve-var-str [s]
(let [[_ ns v] (re-find #"#'([^/]+)/(.+)" s)]
(ns-resolve (symbol ns) (symbol v))))
(defn call* [pfn]
(let [v (-> pfn :v resolve-var-str)]
(apply v (-> pfn :args))))
(defrecord SerializableFn [v args]
(invoke [this]
(call* this))
(call [this] ;; j.u.c.Concurrent
(call* this))
(run [this] ;; j.l.Runnable
(call* this)))
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.