inlined composable fsharp functions around BCL static methods. Supports .net 3.5 through .net Standard
FSharp.Interop.Compose.Linq.Enumerable
open FSharp.Interop.Compose.Linq
seq { 1 .. 5 } |> Enumerable.reverse // seq [5; 4; 3; 2; ...]
Seq.empty<int> |> Enumerable.defaultIfEmpty // seq [0]
[("Rust", "Cohle"); ("Marty", "Hart"); ("Maggie", "Hart")]
|> Enumerable.orderBy snd
|> Enumerable.thenBy fst
//seq [("Rust", "Cohle"); ("Maggie", "Hart"); ("Marty", "Hart")]
FSharp.Interop.Compose.System.String
open FSharp.Interop.Compose.System
["One";"Two";"Three"]
|> Seq.filter (String.startsWith "T") // seq ["Two";"Three"]
See api-docs for wrapper functions
To use precompiled dll, add with nuget
PM> Install-Package FSharp.Interop.Compose
The generate
target of the F# make file Make.fsx provides a mechansim to identify static base class libraries and alter their parameter order and write out the module on a per class basis.
The tool/Generate.fsx script provides the generalized api for generating those wrappers.
Note: inline non-mutating instance method
FSUnit xUnit tests can be added in .fsx
files in the test directory.
./build.fsx
fsi --exec build.fsx