Skip to content

Commit 34c3d50

Browse files
pbachmannIEvangelist
authored andcommitted
Allow demo code to compile (dotnet#29091)
Function to should return Error not Exception.
1 parent c4a2e35 commit 34c3d50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/fsharp/language-reference/computation-expressions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ module Eventually =
309309
| Done value -> result (Ok value)
310310
| NotYetDone work ->
311311
NotYetDone (fun () ->
312-
let res = try Ok(work()) with | exn -> Exception exn
312+
let res = try Ok(work()) with | exn -> Error exn
313313
match res with
314314
| Ok cont -> catch cont // note, a tailcall
315315
| Error exn -> result (Error exn))

0 commit comments

Comments
 (0)