I want to use a computation cache scheme like
o = CACHECOMPUTE complex-key-expr expensive-calc-expr
frequently and elegantly without writing complex-key-expr or expensive-calc-expr twice.
So its ugly:
_=complex-key-expr; o=cache.get(_) or cache.setdefaul t(_,expensive-calc-expr)
Any ideas?
-robert
o = CACHECOMPUTE complex-key-expr expensive-calc-expr
frequently and elegantly without writing complex-key-expr or expensive-calc-expr twice.
So its ugly:
_=complex-key-expr; o=cache.get(_) or cache.setdefaul t(_,expensive-calc-expr)
Any ideas?
-robert
Comment