plutus icon indicating copy to clipboard operation
plutus copied to clipboard

Investigate call-by-need semantics for `force`-`delay`

Open effectfully opened this issue 1 year ago • 0 comments

Currently the following UPLC pseudocode:

let y = delay e
in f (\_ -> force y) + g (\_ -> force y)

will evaluate e twice if both f and g evaluate force y once.

If we used some sort of call-by-need semantics specifically for delay and force, e would only be evaluated twice.

This is worth investigating, I believe.

effectfully avatar May 21 '24 14:05 effectfully