Skip to content

Commit d24bc98

Browse files
committed
Let Continuation support ToView.FromIterable
1 parent 0c488ac commit d24bc98

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

domains-Continuation/src/main/scala/com/thoughtworks/dsl/domains/Continuation.scala

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@ object Continuation {
2020
@inline
2121
def delay[R, A](a: () => A): R !! A = _(a())
2222

23-
inline def apply[R, A](inline a: A): R !! A = { handler =>
24-
reset(handler(a))
23+
inline def apply[R, A](inline f: A): R !! A = { handler =>
24+
reset {
25+
val a = f
26+
handler(a)
27+
}
2528
}
2629

2730
def toTryContinuation[LeftDomain, Value](

0 commit comments

Comments
 (0)