accessing symbols in local context of a closure

2018-05-24 Thread Sonny To
(defn foo[] (let [x 1] (fn [] (+ x 1) ) ) (def bar (foo)) Is there a way to get the value of x from closure bar? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note tha

Re: accessing symbols in local context of a closure

2018-05-24 Thread Alan Thompson
No, it is hidden inside the closure and can't be accessed from the outside. On Thu, May 24, 2018 at 11:22 AM, Sonny To wrote: > (defn foo[] > (let [x 1] >(fn [] > (+ x 1) > ) > ) > > (def bar (foo)) > > Is there a way to get the value of x from closure bar? > > -- > You received

Re: Windows Cygwin lein repl

2018-05-24 Thread Alan Thompson
I have used cygwin extensively in the past, but not recently. If you haven't tried it yet, you should try installing Git For Windows and then use the "Git Bash" command shell. Alan On Wed, May 23, 2018 at 3:37 AM, wrote: > A quick note to anyone coming to this later. I haven't been able to fix

Re: When will the async/await feature in ES8 be introduced in ClojureScript?

2018-05-24 Thread Philos Kim
Refer to https://groups.google.com/forum/#!topic/clojurescript/scUMhU-ctEM for discussions. 2018년 5월 24일 목요일 오후 1시 19분 41초 UTC+9, Philos Kim 님의 말: > > I wonder when the async/await feature in ES8 will be introduced in > ClojureScript. > > Of course, I know there is core.async in ClojureScript bu

Re: accessing symbols in local context of a closure

2018-05-24 Thread James Gatannah
On Thursday, May 24, 2018 at 1:22:42 PM UTC-5, Sonny To wrote: > > (defn foo[] > (let [x 1] >(fn [] > (+ x 1) > ) > ) > > (def bar (foo)) > > Is there a way to get the value of x from closure bar? > I may be describing this incorrectly. You're creating a top-level var named bar

RE: Windows Cygwin lein repl

2018-05-24 Thread Sean Corfield
If you’re on Windows 10, I highly recommend trying Windows Subsystem for Linux and Ubuntu (or one of the other distros in the Microsoft Store). I do all of my Clojure development on Windows that way. Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN An Architect's View -- http://corfield.org/ "