Re: passing a list as a ref bombs

2011-08-31 Thread loonster
Ken: yup, that's what was needed. Thanks. The immutability business is gonna take some time to learn; very different than newLisp, which is a wonderful dialect. On Aug 31, 12:41 pm, Ken Wesson wrote: > On Wed, Aug 31, 2011 at 3:14 PM, loonster wrote: > > I'm converting a newLisp application I

Re: passing a list as a ref bombs

2011-08-31 Thread Ken Wesson
On Wed, Aug 31, 2011 at 3:14 PM, loonster wrote: > I'm converting a newLisp application I wrote, in production for > several years, into clojure, and got stuck immediately. > > (def input-list (ref > '(OR,CA,CO,ID,WA))) > > (defn list-ploop >  "accepts a ref and returns a list's first and alters t

Re: passing a list as a ref bombs

2011-08-31 Thread Aaron Cohen
On Wed, Aug 31, 2011 at 3:14 PM, loonster wrote: >((first in-list) The double parenthesis is suspicious here, it looks like you're trying to invoke the first element of the list as a function. --Aaron -- You received this message because you are subscribed to the Google Groups "Cloju

passing a list as a ref bombs

2011-08-31 Thread loonster
I'm converting a newLisp application I wrote, in production for several years, into clojure, and got stuck immediately. (def input-list (ref '(OR,CA,CO,ID,WA))) (defn list-ploop "accepts a ref and returns a list's first and alters the rest" [in-list] (do (dosync (ref-set input-lis