Task Module
Contains camelCase module-level functions for Task computations.
Functions and values
| Function or value |
Description
|
|
Creates a task that passes the result of the given task to the binder function.
Example
val t: obj
|
|
Creates a
Example
val safeDiv: x: int -> y: int -> 'a
val x: int
val y: int
val task: TaskBuilder
Multiple items
module Result from Microsoft.FSharp.Core -------------------- type Result<'T,'TError> = | Ok of ResultValue: 'T | Error of ErrorValue: 'TError |
Full Usage:
Task.catchWith handler task
Parameters:
exn -> 'T
-
A function to handle (non-cancellation) exceptions, yielding a recovery value based on the exception.
Any exception thrown by handler will propagate.
task : Task<'T>
-
The input Task.
Returns: Task<'T>
A Task that yields the result of task on success, or handler exn on failure.
Propagates the underlying cancellation exception when task is canceled.
Modifiers: inline Type parameters: 'T |
Creates a
Example
val safeDiv: x: int -> y: int -> 'a
val x: int
val y: int
val task: TaskBuilder
Multiple items
module Result from Microsoft.FSharp.Core -------------------- type Result<'T,'TError> = | Ok of ResultValue: 'T | Error of ErrorValue: 'TError |
|
|
|
Creates a task that runs the given task and ignores its result.
Example
val t: obj
type unit = Unit
Multiple items
val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = int |
|
Creates a task that applies the mapping function to the result of the given task.
Example
val t: obj
|
|
Example
val vt: obj
Multiple items
val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = int val t: obj
|
Full Usage:
Task.result value
Parameters:
'T
-
The value to return.
Returns: Task<'T>
A completed task that returns value.
Modifiers: inline Type parameters: 'T |
Creates a task that returns the given value.
Example
val t: obj
|
FSharp.Core