Some methods are also exposed as extensions. This makes possible some uses from C#
Here are some examples:
open FSharpPlus.Extensions
let opt = Option.Sequence [Some 1; Some 2]
let asn = Async.Sequence [| async {return 1}; async {return 2} |]
namespace FSharpPlus
module Extensions
from FSharpPlus
<summary>
Module containing F#+ Extension Methods on existing types
</summary>
val opt: seq<int> option
Multiple items
module Option
from FSharpPlus
<summary>
Additional operations on Option
</summary>
--------------------
module Option
from Microsoft.FSharp.Core
static member Option.Sequence: t: seq<'T option> -> seq<'T> option
union case Option.Some: Value: 'T -> Option<'T>
val asn: Async<int array>
Multiple items
module Async
from FSharpPlus
<summary>
Additional operations on Async
</summary>
--------------------
type Async =
static member AsBeginEnd: computation: ('Arg -> Async<'T>) -> ('Arg * AsyncCallback * obj -> IAsyncResult) * (IAsyncResult -> 'T) * (IAsyncResult -> unit)
static member AwaitEvent: event: IEvent<'Del,'T> * ?cancelAction: (unit -> unit) -> Async<'T> (requires delegate and 'Del :> Delegate)
static member AwaitIAsyncResult: iar: IAsyncResult * ?millisecondsTimeout: int -> Async<bool>
static member AwaitTask: task: Task<'T> -> Async<'T> + 1 overload
static member AwaitWaitHandle: waitHandle: WaitHandle * ?millisecondsTimeout: int -> Async<bool>
static member CancelDefaultToken: unit -> unit
static member Catch: computation: Async<'T> -> Async<Choice<'T,exn>>
static member Choice: computations: seq<Async<'T option>> -> Async<'T option>
static member FromBeginEnd: beginAction: (AsyncCallback * obj -> IAsyncResult) * endAction: (IAsyncResult -> 'T) * ?cancelAction: (unit -> unit) -> Async<'T> + 3 overloads
static member FromContinuations: callback: (('T -> unit) * (exn -> unit) * (OperationCanceledException -> unit) -> unit) -> Async<'T>
...
--------------------
type Async<'T>
static member Async.Sequence: t: seq<Async<'a>> -> Async<seq<'a>>
static member Async.Sequence: t: Async<'T> list -> Async<'T list>
static member Async.Sequence: t: Async<'a> array -> Async<'a array>
static member Async.Sequence: t: Result<Async<'T>,'Error> -> Async<Result<'T,'Error>>
static member Async.Sequence: t: Choice<Async<'T>,'Choice2Of2> -> Async<Choice<'T,'Choice2Of2>>
val async: AsyncBuilder