[CLJ-1061] when-first double evaluation Created: 04/Sep/12 Updated: 20/Oct/12 Resolved: 20/Oct/12
|Affects Version/s:||Release 1.4|
|Fix Version/s:||Release 1.5|
|Reporter:||Steve Miner||Assignee:||Stuart Sierra|
Mac OS X 10.8.1, Java 1.7.0_06
The when-first macro will evaluate the xs expression twice. Admittedly, it does exactly what the doc string says, but that seems undesirable to me. Even without side effects, there's a potential performance issue if xs is some expensive operation.
Patch attached. The main diff is:
|Comment by Stuart Sierra [ 21/Sep/12 7:39 AM ]|