FSharpPlus


Extension Methods

Some methods are also exposed as extensions. This makes possible some uses from C#

Here are some examples:

#r @"nuget: FSharpPlus"
open FSharpPlus.Extensions

let opt  = Option.Sequential [Some 1; Some 2]
let asn = Async.Sequential [| async {return 1}; async {return 2} |]
namespace FSharpPlus
module Extensions from FSharpPlus
<summary> Module containing F#+ Extension Methods on existing types </summary>
val opt: int seq option
Multiple items
module Option from FSharpPlus
<summary> Additional operations on Option </summary>

--------------------
module Option from Microsoft.FSharp.Core
static member Option.Sequential: t: 'T option seq -> 'T seq 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: Async<'T option> seq -> 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>
Multiple items
static member Async.Sequential: computations: Async<'T> seq -> Async<'T array>

--------------------
static member Async.Sequential: t: Async<'T> list -> Async<'T list>
static member Async.Sequential: t: Async<'a1> array -> Async<'a1 array>
static member Async.Sequential: t: Result<Async<'T>,'Error> -> Async<Result<'T,'Error>>
static member Async.Sequential: t: Choice<Async<'T>,'Choice2Of2> -> Async<Choice<'T,'Choice2Of2>>
val async: AsyncBuilder