Re: Default random in Clojure doesn't seem to fit fp paradigm

2012-12-05 Thread JonC
On Wednesday, December 5, 2012 10:30:26 PM UTC, Karsten Schmidt wrote: > > FWIW dynvars are quite a common solution to these kind of scenarios: > And that's an excellent solution. However, I still think that it's a problem that shouldn't need solving in the first place - the basic library sho

Re: Default random in Clojure doesn't seem to fit fp paradigm

2012-12-05 Thread JonC
On Wednesday, December 5, 2012 8:45:00 PM UTC, miner wrote: > > You should treat rand and friends like i/o. Don't bury them deep in your > code. Write your pure functions so that they take a seed value (or > sequence). This is one approach to by-passing clojure's randoms, yes. (To be hone

Default random in Clojure doesn't seem to fit fp paradigm

2012-12-05 Thread JonC
Ok: first of all, Clojure has outstandingly the best core library I've seen. I am awed by how wonderfully the protocol approach makes data structures, and the good taste applied to getting an API that's reasonably minimal and wonderfully complete. I've not posted before because I've had nothing