You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Continuations are often modeled as first-class functions, but they are very special: often nothing ever happens after they are done executing. Hence, a continuation should be of Cont[A] type similar to (A => Nothing). If we can specify preconditions (refinements) on A, then we do not need to worry about the effects of the continuation, so we could allow effects in the body of continuation.
All this speaks in favor of defining Continuation trait with precondition on its apply and more flexible rules for effects.
The text was updated successfully, but these errors were encountered:
Continuations are often modeled as first-class functions, but they are very special: often nothing ever happens after they are done executing. Hence, a continuation should be of Cont[A] type similar to (A => Nothing). If we can specify preconditions (refinements) on A, then we do not need to worry about the effects of the continuation, so we could allow effects in the body of continuation.
All this speaks in favor of defining Continuation trait with precondition on its
apply
and more flexible rules for effects.The text was updated successfully, but these errors were encountered: