The only 'implicit' laziness in Clojure comes from lazy lists. map, filter, and others are lazy. If you map over a list for side effects, don't use map, use dolist or wrap the map in a doall.
On Thu, Sep 5, 2013 at 9:28 PM, Kang Tu <tni...@gmail.com> wrote: > Hi all, > > Clojure something *automatically" removed my command. These commands have > side-effects and the results of the commands are not used. > > For example, in my seesaw program, when listening action events of one > button, the program would change the icon of a group of panels which satisfy > some specific criteria. I use config! function to do this. Interesting, If I > don't use the output of config! in the downstream program (which is the > common case), the config! command would be ignored. > > It looks like there is some optimization mechanism bypass that command. > > How should I deal with that? > > Thanks > > Kang > > -- > -- > 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 that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. -- -- 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 that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.