Re: idempotency

2012-06-30 Thread Alan Malloy
That's really a stricter requirement than idempotence (ie, functional purity). I don't believe the compiler ever does this. The JVM might, if it's able to inline some particular method call and discover therein that no mutation happens, but that's probably pretty rare given the amount of indire

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 > "I may freely substi