Skip to content

Commit a1982b3

Browse files
authored
Allow demo code to compile (#29091)
Function to should return Error not Exception.
1 parent 5853179 commit a1982b3

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)