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
Copy file name to clipboardExpand all lines: src/FSharpx.Extras/ComputationExpressions/Monad.fs
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -232,6 +232,12 @@ module Option =
232
232
| Some x -> x
233
233
| None -> failwith m
234
234
235
+
/// Gets the value associated with the option or print to a string buffer and raise an exception with the given result. Helper printers must return strings.
236
+
let inlinegetOrFailF fmt =
237
+
function
238
+
| Some x -> x
239
+
| None -> failwithf fmt
240
+
235
241
/// Gets the value associated with the option or raises the supplied exception.
0 commit comments