On Friday, May 25, 2018 at 7:40:12 AM UTC-5, Sonny To wrote:
>
> Hi James,
> I'm trying to access the local bindings of the closure like it is an object
> (.-x bar) should give 1. I can use a defrecord for this but I want to use
> regular functions and no macro magic
>
This isn't quite what yo
My curiosity got the better of me:
(require '[clojure.spec.alpha :as spec]
'[clojure.test :refer [is with-test]])
(spec/fdef local-bindings
:args (spec/cat :closure fn?)
:ret (spec/map-of simple-keyword? any?))
(with-test
(defn local-bindings [closure]
(into {}
(map
Hi James,
I'm trying to access the local bindings of the closure like it is an object
(.-x bar) should give 1. I can use a defrecord for this but I want to use
regular functions and no macro magic
On Friday, May 25, 2018 at 9:01:22 AM UTC+3, James Gatannah wrote:
> On Thursday, May 24, 2018 at