5
Rozumiem z tego blog post, w jaki sposób jest reifikowany pojedynczy shift
w ramach reset
.Jak resetuje się dwie zmiany w Scali?
reset { 1 + shift {k:Int => Int => k(5)} + 1}
jest reified do
val reified = {shiftValue:Int => 1 + shiftValue + 1}; reified (5)
Teraz mam inny przykład:
reset { 1 + shift(k1:Int => Int => k1(5)} + 1; 2 + shift(k2:Int => Int => k2(6)} + 2 }
Jest reified do:
val reified ={shifyValue1:Int => 1 + shiftValue + 1; 2 + shift(k2:Int => Int => k2(6)} + 2 } reified(5)
Jak mogę zreifikować go dalej, aby uzyskać pozbyć się drugiego shift
?