Re: idempotency

2012-06-30 Thread Alan Malloy
given the amount of indirection that goes on when calling everything through the IFn interface. On Saturday, June 30, 2012 5:30:02 PM UTC-7, Brian Marick wrote: > > In its optimization, does the Clojure compiler ever assume idempotency? > That is, does it ever look at a function appli

Re: idempotency

2012-06-30 Thread Softaddicts
You should then use memoize explicitly then. Of course, avoid this if you have side effects in the function. Luc > In its optimization, does the Clojure compiler ever assume idempotency? That > is, does it ever look at a function application `(f x y z)` and say to itself > &quo

idempotency

2012-06-30 Thread Brian Marick
In its optimization, does the Clojure compiler ever assume idempotency? That is, does it ever look at a function application `(f x y z)` and say to itself "I may freely substitute the result of the first application of `f` to those particular arguments for any later call"? I could