Overview

FSharpWrap generates F# functions and active patterns for your dependencies, reducing the amount of F# code you need to write just to use code written in other .NET languages.

Example

 1: 
 2: 
 3: 
 4: 
 5: 
 6: 
 7: 
 8: 
 9: 
10: 
11: 
12: 
13: 
14: 
15: 
16: 
17: 
18: 
open System.Collections.Immutable

let original = ImmutableList.CreateRange [| 1; 5; 9 |]

// Currying!
let add2 = ImmutableList.add 2
let copy = add2 original

// Computation Expressions
let example =
    ImmutableList.expr {
        3
        1
        4
        yield! copy
    }

printfn "%A" example
seq [3; 1; 4; 1; ...]

Tutorial

Click here to get started with using FSharpWrap.

namespace System
namespace System.Collections
namespace System.Collections.Immutable
val original : ImmutableList<int>
Multiple items
type ImmutableList =
  static member Create<'T> : unit -> ImmutableList<'T> + 2 overloads
  static member CreateBuilder<'T> : unit -> Builder<'T>
  static member CreateRange<'T> : items:IEnumerable<'T> -> ImmutableList<'T>
  static member IndexOf<'T> : list:IImmutableList<'T> * item:'T -> int + 3 overloads
  static member LastIndexOf<'T> : list:IImmutableList<'T> * item:'T -> int + 3 overloads
  static member Remove<'T> : list:IImmutableList<'T> * value:'T -> IImmutableList<'T>
  static member RemoveRange<'T> : list:IImmutableList<'T> * items:IEnumerable<'T> -> IImmutableList<'T>
  static member Replace<'T> : list:IImmutableList<'T> * oldValue:'T * newValue:'T -> IImmutableList<'T>
  static member ToImmutableList<'TSource> : source:IEnumerable<'TSource> -> ImmutableList<'TSource> + 1 overload

--------------------
type ImmutableList<'T> =
  member Add : value:'T -> ImmutableList<'T>
  member AddRange : items:IEnumerable<'T> -> ImmutableList<'T>
  member BinarySearch : item:'T -> int + 2 overloads
  member Clear : unit -> ImmutableList<'T>
  member Contains : value:'T -> bool
  member ConvertAll<'TOutput> : converter:Func<'T, 'TOutput> -> ImmutableList<'TOutput>
  member CopyTo : array:'T[] -> unit + 2 overloads
  member Count : int
  member Exists : match:Predicate<'T> -> bool
  member Find : match:Predicate<'T> -> 'T
  ...
  nested type Builder
  nested type Enumerator
ImmutableList.CreateRange<'T>(items: System.Collections.Generic.IEnumerable<'T>) : ImmutableList<'T>
val add2 : (ImmutableList<int> -> ImmutableList<int>)
val internal add : value:'T -> this:ImmutableList<'T> -> ImmutableList<'T>
val copy : ImmutableList<int>
val example : ImmutableList<int>
val internal expr : ImmutableList.ImmutableListBuilder
val printfn : format:Printf.TextWriterFormat<'T> -> 'T