Re: Local variable

2014-07-09 Thread Cecil Westerhof
2014-07-09 4:19 GMT+02:00 Bob Hutchison : > > On Jul 8, 2014, at 7:08 PM, Cecil Westerhof > wrote: > > 2014-07-08 23:11 GMT+02:00 Bob Hutchison : > >> >> On Jul 8, 2014, at 9:40 AM, Cecil Westerhof >> wrote: >> >> > In Clojure you can define a local constant with let, but I need a >> variable (I

Re: Local variable

2014-07-08 Thread Bob Hutchison
On Jul 8, 2014, at 7:08 PM, Cecil Westerhof wrote: > 2014-07-08 23:11 GMT+02:00 Bob Hutchison : > > On Jul 8, 2014, at 9:40 AM, Cecil Westerhof wrote: > > > In Clojure you can define a local constant with let, but I need a variable > > (I think). > > > > I want to do the following. I have a

Re: Local variable

2014-07-08 Thread Cecil Westerhof
2014-07-08 23:11 GMT+02:00 Bob Hutchison : > > On Jul 8, 2014, at 9:40 AM, Cecil Westerhof > wrote: > > > In Clojure you can define a local constant with let, but I need a > variable (I think). > > > > I want to do the following. I have a function that checks several > things. Every time an error

Re: Local variable

2014-07-08 Thread Bob Hutchison
On Jul 8, 2014, at 9:40 AM, Cecil Westerhof wrote: > In Clojure you can define a local constant with let, but I need a variable (I > think). > > I want to do the following. I have a function that checks several things. > Every time an error is found I want to set the variable errors to: >

Re: Local variable

2014-07-08 Thread blake
> > Also, just a matter of style, but it's customary to leave closing parens >> at the end of a line, rather than by themselves on their own line. >> > > ​I do that also, but when I am editing I put them on there own line, > because in this way changes are faster. When I am satisfied, I merge them.

Re: Local variable

2014-07-08 Thread Cecil Westerhof
2014-07-08 18:14 GMT+02:00 John Gabriele : > On Tuesday, July 8, 2014 11:38:42 AM UTC-4, Cecil Westerhof wrote: >> >> >> >> >> 2014-07-08 16:55 GMT+02:00 John Gabriele : >> >> On Tuesday, July 8, 2014 9:40:54 AM UTC-4, Cecil Westerhof wrote: In Clojure you can define a local constant wit

Re: Local variable

2014-07-08 Thread John Gabriele
On Tuesday, July 8, 2014 11:38:42 AM UTC-4, Cecil Westerhof wrote: > > > > > 2014-07-08 16:55 GMT+02:00 John Gabriele >: > >> On Tuesday, July 8, 2014 9:40:54 AM UTC-4, Cecil Westerhof wrote: >>> >>> In Clojure you can define a local constant with let, but I need a >>> variable (I think). >>> >>>

Re: Local variable

2014-07-08 Thread Lars Nilsson
On Tue, Jul 8, 2014 at 11:38 AM, Cecil Westerhof wrote: > I al-ready tried something along those lines: > (defn error-in-datastruct-p [] > (let [errors (atom ())] >(if (= (count objects) (count *object-locations*)) >(map (fn [x] > (println x) >

Re: Local variable

2014-07-08 Thread Cecil Westerhof
2014-07-08 16:55 GMT+02:00 John Gabriele : > On Tuesday, July 8, 2014 9:40:54 AM UTC-4, Cecil Westerhof wrote: >> >> In Clojure you can define a local constant with let, but I need a >> variable (I think). >> >> I want to do the following. I have a function that checks several things. >> Every tim

Re: Local variable

2014-07-08 Thread John Gabriele
On Tuesday, July 8, 2014 9:40:54 AM UTC-4, Cecil Westerhof wrote: > > In Clojure you can define a local constant with let, but I need a variable > (I think). > > I want to do the following. I have a function that checks several things. > Every time an error is found I want to set the variable err

Re: Local variable

2014-07-08 Thread Ashish Negi
you can make that variable "error" as an Agent and change it asynchronously or as a Ref if you want the change synchronously. other part of the code remains same. On Tuesday, 8 July 2014 19:10:54 UTC+5:30, Cecil Westerhof wrote: > > In Clojure you can define a local constant with let, but I need

Re: Local variable

2014-07-08 Thread Michael Klishin
 On 8 July 2014 at 17:40:49, Cecil Westerhof (cldwester...@gmail.com) wrote: > > In Clojure you can define a local constant with let, but I need > a variable (I think). They are not constants. Locals can be "overwritten" but their data structures are immutable (by default). > I want to do the f