On Fri, Jan 6, 2012 at 11:28 PM, Alan Malloy wrote:
> but if you look at the post
There is no call for taking a rude tone. I correctly answered the
question as originally posed.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group,
On Jan 6, 7:32 pm, Cedric Greevey wrote:
> On Fri, Jan 6, 2012 at 10:22 PM, Alan Malloy wrote:
> > On Jan 6, 6:16 pm, Cedric Greevey wrote:
> >> On Fri, Jan 6, 2012 at 4:34 PM, Alan Malloy wrote:
> >> > On Jan 6, 12:56 pm, Jozef Wagner wrote:
> >> >> Thank you,
>
> >> >> But the things are mor
On Fri, Jan 6, 2012 at 10:22 PM, Alan Malloy wrote:
> On Jan 6, 6:16 pm, Cedric Greevey wrote:
>> On Fri, Jan 6, 2012 at 4:34 PM, Alan Malloy wrote:
>> > On Jan 6, 12:56 pm, Jozef Wagner wrote:
>> >> Thank you,
>>
>> >> But the things are more complicated. In my case, I need to update the atom
On Jan 6, 6:16 pm, Cedric Greevey wrote:
> On Fri, Jan 6, 2012 at 4:34 PM, Alan Malloy wrote:
> > On Jan 6, 12:56 pm, Jozef Wagner wrote:
> >> Thank you,
>
> >> But the things are more complicated. In my case, I need to update the atom
> >> with the result of a (native) function which unfortunat
On Fri, Jan 6, 2012 at 4:34 PM, Alan Malloy wrote:
> On Jan 6, 12:56 pm, Jozef Wagner wrote:
>> Thank you,
>>
>> But the things are more complicated. In my case, I need to update the atom
>> with the result of a (native) function which unfortunately also performs
>> some side effects and cannot b
On Jan 6, 12:56 pm, Jozef Wagner wrote:
> Thank you,
>
> But the things are more complicated. In my case, I need to update the atom
> with the result of a (native) function which unfortunately also performs
> some side effects and cannot be split in two.
>
> Updated example:
>
> (def state {:resul
Thank you,
But the things are more complicated. In my case, I need to update the atom
with the result of a (native) function which unfortunately also performs
some side effects and cannot be split in two.
Updated example:
(def state {:result nil :input [1 2 3]})
(defn update-item!
[item]
On Fri, Jan 6, 2012 at 3:02 PM, Jozef Wagner wrote:
> Consider this contrived piece of code:
>
> (def aval (atom {:dumped false :contents "hello world"}))
>
> (defn update!
> [item]
> (when-not (:dumped item)
> (spit "a.out" (:contents item) :append true)
> (assoc item :dumped true)))
Consider this contrived piece of code:
(def aval (atom {:dumped false :contents "hello world"}))
(defn update!
[item]
(when-not (:dumped item)
(spit "a.out" (:contents item) :append true)
(assoc item :dumped true)))
How should I correctly call update! ? Each of following two calls ha