Eta-extension

This commit is contained in:
Dmitry Boulytchev 2020-02-15 22:58:43 +03:00
parent ddc2121fcf
commit f5f7f3ceb8
7 changed files with 43 additions and 24 deletions

View file

@ -2,10 +2,10 @@ public fun makeLazy (f) {
local value, set = false;
fun () {
if set
then value
else set := true; value := f (); value
fi
if set
then value
else set := true; value := f (); value
fi
}
}