Namespace: FsToolkit.ErrorHandling
Function Signature:
('a -> 'b) -> Job<'a option> -> Job<'b option>Note: Many use-cases requiring map operations can also be solved using the jobOption computation expression.
Given the function
tryFindPersonById : int -> Job<Person option>We can get the name of the person like this:
// Job<string option>
tryFindPersonById 42
|> JobOption.map (fun person -> person.Name)let maybeValue : Job<int option> = Job.singleton (Some 10)
maybeValue
|> JobOption.map (fun x -> x * 2)
// job { return Some 20 }