Interested in the concept of continuing, I started reading wiki posts and came up with this βsimpleβ example:
reset { ... shift { k: (Int=>Int) =>
Without knowing Scala, I was completely lost here, I could not understand how 8 would come out.
Below I tried to understand the meaning, but could not. Any guy please give me a short explanation? Yes, there are Scala grammar books, but they are too thick, I'm more interested in understanding the concept of continuation of continuation than the main language of Scala ...
(Int=>Int)
It looks like a C # delegate, Int input, Int output.
k: (Int=>Int) => k(7)
I got lost here ... what is k and what is (Int => Int) => k (7)?
shift { k: (Int=>Int) => k(7) } + 1
Even more lost ...
reset { ...; shift { k: (Int=>Int) => k(7) } + 1 }
More and more lost ...
athos
source share