apply

Namespace: FsToolkit.ErrorHandling

Function Signature:

Job<('a -> 'b)> -> Job<'a> -> Job<'b>

Examples

Take the following function for example

// string -> int
let characterCount (s: string) = s.Length

Example 1

let result =
    Job.singleton "foo" // Job<string>
    |> Job.apply (Job.singleton characterCount) // Job<int>

// job { return 3 }

Last updated