28 ms·
It's almost like sometimes it would have handy to do case ch <- defer foo(): and only have foo() be evaluated if ch is ready for writing and also chosen a
by ralph 14y ago
It's almost like sometimes it would have handy to do
case ch <- defer foo():
and only have foo() be evaluated if ch is ready for writing and also chosen amongst the cases. As the (fixed) code stands either the Sprintf() and Sum() or Count() is wasted on each iteration. I suppose in some cases you can calculate the initial values before the for-loop and then replenish them in the case: when they're used.