Lecture 11 — Computation expressions
Introduction
Three lectures have used one composition shape. Lecture 7 chained
validation checks with Result.bind, Lecture 8 passed continuations by
hand, and Lecture 10 wrote generators with gen { … }. In each case
there was a type M<'T>, a bind that chains a step onto a value of
that type and a return that wraps a plain value, and a chain of steps
written by hand became nested callbacks: fun x -> … fun y -> ….
A computation expression is F#'s notation for such a chain. let! x = e
is a bind, return v is a return, and the compiler rewrites the body
into calls of the methods of a "builder" object. The builder decides what
the chain means: no result, an error, a continuation, a sequence. This
lecture writes the builders behind the notation.
FsCheck is needed for concept 2 and for the worked examples; as in
Lecture 10, the first run of the script needs the network once:
#r "nuget: FsCheck, 3.6.0"
open FsCheck
open FsCheck.FSharp
let seed = Rnd (2026UL, 11UL)
1 · One shape, four times
The bind functions of lectures 7, 8 and 10 have one shape: a type
M<'T>, a bind that chains a step onto a value of it, and a return
that wraps a plain value.
Four signatures
Option.bind : ('a -> 'b option) -> 'a option -> 'b option
Result.bind : ('a -> Result<'b, 'e>) -> Result<'a, 'e> -> Result<'b, 'e>
Gen.bind : ('a -> Gen<'b>) -> Gen<'a> -> Gen<'b>
a continuation step (Lecture 8), with c : ('a -> 'r) -> 'r
and f : 'a -> ('b -> 'r) -> 'r:
fun k -> c (fun x -> f x k) : ('b -> 'r) -> 'r
|
What do these four have in common? Each has
-
a type
M<'T>: 'T option, Result<'T, 'e>, Gen<'T> and the function
type ('T -> 'r) -> 'r;
-
a
bind that takes a value of M<'a> and a step 'a -> M<'b> and
gives an M<'b>;
-
a
return that wraps a plain value: Some, Ok, Gen.constant and
fun k -> k x.
The argument order differs: the library functions Option.bind,
Result.bind and Gen.bind take the step first and the value second
(so that they fit after |>); the continuation step above, and the
builder methods of concept 3, take the value first.
The staircase
A chain of three option steps written by hand nests one callback inside
the other, a "staircase". Three steps on a string:
let tryParse (s: string) =
match System.Int32.TryParse s with
| true, n -> Some n
| _ -> None
let tryDivide (n: int) = if n = 0 then None else Some (100 / n)
let tryRoot (n: int) = if n < 0 then None else Some (sqrt (float n))
let staircase (s: string) =
tryParse s
|> Option.bind (fun n ->
tryDivide n
|> Option.bind (fun q ->
tryRoot q
|> Option.bind (fun r ->
Some (n, q, r))))
let staircaseFour = staircase "4"
let staircaseWord = staircase "four"
Each step sees the names bound by the steps before it (n, q, r),
and the first None ends the chain. Lecture 8's sizeK is the same
staircase with continuations:
sizeK l <| fun sl ->
sizeK r <| fun sr ->
k (sl + 1 + sr)
|
The name
A type constructor with these two operations is called a monad; the name
is all the theory this lecture needs.
Why it matters: every later concept is this shape with a different
M<'T>, and the notation of concept 2 removes the staircase from all of
them at once.
2 · The notation and its translation
builder { … } is translated by the compiler into calls of the builder's
methods: let! becomes Bind, return becomes Return.
The form and the rules
A computation expression is b { body }, where b is an ordinary value
(the "builder") and the body is F# code with a few extra constructs. The
compiler rewrites ("desugars") the body into method calls on b. The
rules this lecture uses:
let! x = e followed by rest
|
b.Bind (e, fun x -> rest)
|
return v
|
b.Return v
|
return! e
|
b.ReturnFrom e
|
do! e followed by rest
|
let! () = e, that is b.Bind (e, fun () -> rest)
|
plain let, do and match |
unchanged, with their bodies translated |
the whole body |
wrapped in b.Delay (fun () -> …) when b defines Delay |
A let! on the last line is an error: something must follow it, usually
a return.
Two steps, written out
The two-step expression and its translation, on a builder b with Bind
and Return:
b { b.Bind (e1, fun x ->
let! x = e1 b.Bind (e2, fun y ->
let! y = e2 b.Return (x + y)))
return x + y
}
|
The translated form is the staircase of concept 1, which is the point:
the notation hides the nesting, the compiler puts it back.
Lecture 10's generator, by hand
Lecture 10 wrote ordPairGen with gen { }. FsCheck's gen is a
builder value with Bind and Return methods, so the same generator can
be written by hand with them:
let ordPairGen =
gen {
let! j = Gen.choose (1, 100)
let! i = Gen.choose (0, j - 1)
return (i, j)
}
let ordPairGen' =
gen.Bind (Gen.choose (1, 100), fun j ->
gen.Bind (Gen.choose (0, j - 1), fun i ->
gen.Return (i, j)))
Sampled under the same seed, size and count, the two generators give the
same values:
let ordPairSample = Gen.sampleWithSeed seed 10 5 ordPairGen
[|(20, 68); (1, 13); (12, 61); (26, 85); (2, 4)|]
|
let ordPairSample' = Gen.sampleWithSeed seed 10 5 ordPairGen'
[|(20, 68); (1, 13); (12, 61); (26, 85); (2, 4)|]
|
let ordPairSame = (ordPairSample = ordPairSample')
The hand-written form is the readable equivalent, not the compiler's
output. FsCheck's builder also defines Delay and BindReturn, so the
compiler's own elaboration of the gen { } form is this: Delay wraps
the whole body in a function, and the final let! … return pair becomes
one BindReturn call, whose function returns the plain value:
let ordPairGen'' =
gen.Delay (fun () ->
gen.Bind (Gen.choose (1, 100), fun j ->
gen.BindReturn (
Gen.choose (0, j - 1), fun i -> (i, j))))
let ordPairSample'' = Gen.sampleWithSeed seed 10 5 ordPairGen''
[|(20, 68); (1, 13); (12, 61); (26, 85); (2, 4)|]
|
let ordPairSameElaborated = (ordPairSample = ordPairSample'')
All three are the same generator; the builder's extra methods change
how the chain is built, not what it means.
Where the full rules are
The complete translation, including use!, while, try and custom
operations, is in the
computation-expression section of the F# language specification.
The rules of this lecture are the ones its builders need.
Why it matters: let! is not magic; it is a method call the reader can
write out, and the builder is where its meaning lives.
3 · Writing a builder
A builder is an object whose methods the compiler calls; writing one
means giving the type's bind and return the names Bind and Return.
An option builder
The methods take the value first, so Bind flips the arguments of
Option.bind:
type OptionBuilder () =
member _.Bind (o, f) = Option.bind f o
member _.Return x = Some x
let option = OptionBuilder ()
What does this expression evaluate to?
let optionNone =
option {
let! x = (None: int option)
return x + 1
}
Bind (None, f) is Option.bind f None, which is None without calling
f: the return line never runs.
Square roots
The 2025 example, with the step squareRoot : float -> float option:
let squareRoot x = if x >= 0.0 then Some (sqrt x) else None
let rootOfFive =
option {
let! five = Some 5.0
let! root = squareRoot five
return root
}
let rootOfMinusFive =
option {
let! minusFive = Some -5.0
let! root = squareRoot minusFive
return root
}
let rootAfterNone =
option {
let! missing = None
let! root = squareRoot missing
return root
}
A Result builder
Lecture 7 chained four validation checks with >> Result.bind. The
definitions again (a separate script):
type UserId = UserId of int
type Request = { userId: UserId; name: string; email: string }
let request =
{ userId = UserId 1; name = "Kati Karu"
email = " Kati.Karu@TalTech.ee " }
let nameNotBlank (r: Request) =
if r.name = "" then
Error "Name must not be blank"
else
Ok r
let name50 (r: Request) =
if r.name.Length > 50 then
Error "Name must not be longer than 50 chars"
else
Ok r
let emailNotBlank (r: Request) =
if r.email = "" then
Error "Email must not be blank"
else
Ok r
let emailHasAt (r: Request) =
if r.email.Contains '@' then
Ok r
else
Error $"Email {r.email} is not valid"
let validateRequest =
nameNotBlank
>> Result.bind name50
>> Result.bind emailNotBlank
>> Result.bind emailHasAt
A Result builder has the same two methods as the option builder, over
Result.bind and Ok:
type ResultBuilder () =
member _.Bind (r, f) = Result.bind f r
member _.Return x = Ok x
let result = ResultBuilder ()
The chain as let! lines: each line is a check, and the first Error
ends the chain, as the first None did above.
let validateRequest' (r: Request) =
result {
let! r1 = nameNotBlank r
let! r2 = name50 r1
let! r3 = emailNotBlank r2
let! r4 = emailHasAt r3
return r4
}
let chainSame = (validateRequest request = validateRequest' request)
let longName = { request with name = String.replicate 60 "x" }
let chainSameLong = (validateRequest longName = validateRequest' longName)
let longNameResult = validateRequest' longName
Error "Name must not be longer than 50 chars"
|
A logging builder
A type that pairs a value with the messages produced on the way to it.
Bind runs the step and appends its messages after the ones already
collected; Return wraps a value with no messages:
type 'a Logging = Logging of 'a * string list
type LoggingBuilder () =
member _.Bind (Logging (x, msgs1), f) =
let (Logging (y, msgs2)) = f x
Logging (y, msgs1 @ msgs2)
member _.Return x = Logging (x, [])
The compiler asks for a method
With this builder, a computation expression whose body ends in a unit
expression (the 2025 write shape: log, then do something) does not
compile. The code and the error, captured on SDK 10.0.302:
let logging = LoggingBuilder ()
let log msg = Logging ((), [msg])
let write (s: string) =
logging {
do! log ("writing: " + s)
printfn "%s" s
}
[lang=text]
error FS0708: This control construct may only be used if the
computation expression builder defines a 'Zero' method
|
A body that ends without a return is translated to b.Zero (), so the
builder must say what an empty result is. The compiler names the missing
method; that is how every builder in this lecture grows. Zero for
logging is the unit value with no messages. In a script a type can be
extended after its definition (in a file, the member goes inside the
type):
type LoggingBuilder with
member _.Zero () = Logging ((), [])
let logging = LoggingBuilder ()
let log msg = Logging ((), [msg])
let write (s: string) =
logging {
do! log ("writing: " + s)
printfn "%s" s
}
let written = write "hello"
Logging ((), ["writing: hello"])
|
The worked program
A pure step that parses a number and logs that it did so, and a
computation that uses do! for the logging steps and let! for the
value:
let parse (s: string) = Logging (int s, [$"parsed {s}"])
let loggingTest =
logging {
do! log "starting"
let! n = parse "42"
do! log "doubling"
return n * 2
}
Logging (84, ["starting"; "parsed 42"; "doubling"])
|
The value is 84 and the messages are in the order the steps ran: each
Bind appended the step's messages after the ones it had.
Why it matters: a builder is the type's bind and return given the
names the compiler looks for, and the compiler tells you which further
name it needs.
4 · Continuations as a computation expression
M<'T> may be a function type: a continuation builder turns Lecture 8's
hand-written continuation passing into let! lines.
Lecture 8's tree
The definitions again:
type 'a BinTree =
| Empty
| Node of 'a BinTree * 'a * 'a BinTree
let leaf x = Node (Empty, x, Empty)
let t = Node (Node (leaf 2, 7, Empty),
9,
Node (leaf 13, 21, leaf 25))
let rec size t =
match t with
| Empty -> 0
| Node (l, _, r) -> size l + 1 + size r
The continuation builder
A continuation-passing computation is a function that takes the
continuation k and calls it with the result: M<'T> is here the
function type ('T -> 'r) -> 'r. Bind runs the first computation
with a continuation that runs the step, and Return calls k on the
value, as in concept 1:
type CPSBuilder () =
member _.Bind (c, f) = fun k -> c (fun x -> f x k)
member _.Return x = fun k -> k x
let cps = CPSBuilder ()
let runCPS c = c id
Size with let!
Lecture 8's sizeK with the staircase replaced by two let! lines. A
match may appear inside the expression, with a return in each
branch:
let rec sizeC t =
cps {
match t with
| Empty -> return 0
| Node (l, _, r) ->
let! sl = sizeC l
let! sr = sizeC r
return sl + 1 + sr
}
let sizeCT = runCPS (sizeC t)
let sizeSame = (sizeCT = size t)
runCPS supplies id as the final continuation, as sizeK t id did.
What Delay would change
Lecture 8's million-node left spine, built with the tail-recursive
spine:
let rec spine n acc =
if n = 0 then
acc
else
spine (n - 1) (Node (acc, n, Empty))
let deep = spine 1_000_000 Empty
sizeK deep id computed 1000000 in Lecture 8. sizeC deep overflows
the stack before any continuation is called, captured once on SDK
10.0.302 (the first lines):
> let c = sizeC deep;;
Stack overflow.
Repeated 13709 times:
--------------------------------
at FSI_0001.sizeC[...](BinTree`1<Int32>)
|
The overflow happens while the computation is constructed, not when it
is run: cps.Bind (sizeC l, …) evaluates its first argument, sizeC l,
when the expression is built, so the recursion over the spine runs on the
stack before runCPS is reached. A builder with Delay receives the body
as a function and can postpone it until the continuation arrives; adding
it is exercise 2, and these notes do not evaluate sizeC deep.
Why it matters: the builder decides when the work happens, not only what
it means.
5 · Sequence expressions are computation expressions
seq { … } is the same mechanism: for, yield and yield! are
translated to builder methods, and the translation is what makes a
sequence lazy.
The opener
The 2025 lecture opened with this expression. A sequence is enumerated
when something asks for its elements; these notes convert every sequence
to a list before showing it, so that the page shows all the elements:
let seqOpener = seq { for i in 0 .. 3 -> (i, i * i) } |> Seq.toList
[(0, 0); (1, 1); (2, 4); (3, 9)]
|
The forms inside seq { } and the methods they are translated to:
for x in xs do body
|
b.For (xs, fun x -> body)
|
yield v (for … -> v is for … do yield v)
|
b.Yield v
|
yield! s
|
b.YieldFrom s
|
one part followed by another |
b.Combine (first, b.Delay (fun () -> second))
|
if c then yield v without else
|
if c then b.Yield v else b.Zero ()
|
The notional SeqBuilder
The language specification describes seq as if it had this builder
(quoted with its For line corrected: the published text has g for
f):
type SeqBuilder () =
member x.Yield v = Seq.singleton v
member x.YieldFrom (s: seq<_>) = s
member x.Return (() : unit) = Seq.empty
member x.Combine (xs1, xs2) = Seq.append xs1 xs2
member x.For (xs, f) = Seq.collect f xs
member x.While (guard, body) = …
member x.TryFinally (xs, compensation) = …
member x.Using (resource, xs) = …
|
Combine is Seq.append, For is Seq.collect (Lecture 4's
List.collect on sequences), Yield is Seq.singleton. The compiler
elaborates seq directly, but a builder with these methods behaves the
same.
A two-method builder
For and Yield are enough for the opener:
type MySeqBuilder () =
member _.For (xs: 'a seq, f: 'a -> 'b seq) = Seq.collect f xs
member _.Yield x = Seq.singleton x
let myseq = MySeqBuilder ()
let myseqOpener = myseq { for i in 0 .. 3 -> (i, i * i) } |> Seq.toList
[(0, 0); (1, 1); (2, 4); (3, 9)]
|
let openerSame = (seqOpener = myseqOpener)
Two yields one after the other are not: the compiler asks for the
method that joins two parts, captured on SDK 10.0.302:
let two = myseq { yield 1; yield 2 }
[lang=text]
error FS0708: This control construct may only be used if the
computation expression builder defines a 'Combine' method
|
With Combine added the compiler asks for Delay next, because the
second part of a Combine is passed delayed. Completing the builder
with Combine, Delay and Zero is exercise 3.
Has the body run?
A sequence whose body counts how often it runs. squares is defined,
and the counter is read before anything enumerates it:
let mutable evaluated = 0
let squares =
seq {
for i in 1 .. 3 do
evaluated <- evaluated + 1
yield i * i
}
let evaluatedBefore = evaluated
let squaresList = Seq.toList squares
let evaluatedAfter = evaluated
The body ran three times, once per element, and only when Seq.toList
enumerated the sequence. The counters in these notes count every
enumeration, so running one of these examples twice in F# Interactive
gives larger counts than the page shows.
An infinite sequence
A sequence may therefore be infinite: yield! with recursion defines
one, and Seq.take enumerates as much of it as is asked for:
let rec from n =
seq {
yield n
yield! from (n + 1)
}
let fromTen = from 10 |> Seq.take 5 |> Seq.toList
Why it matters: the same translation, with Delay, is what makes
sequences lazy; seq { } is not a special loop, it is a builder.
Deferred evaluation beyond seq
Three library tools defer work in the same spirit; one example each.
lazy e is a value that is computed on the first Force and remembered:
let mutable forced = 0
let lazyValue = lazy (forced <- forced + 1; 42)
let forcedBefore = forced
let lazyForced = lazyValue.Force ()
let lazyForcedAgain = lazyValue.Force ()
let forcedAfter = forced
Seq.cache enumerates a sequence once and replays the elements: two
listings, and the body ran three times, not six:
let mutable cachedEvaluated = 0
let cached =
seq {
for i in 1 .. 3 do
cachedEvaluated <- cachedEvaluated + 1
yield i
}
|> Seq.cache
let cachedOnce = Seq.toList cached
let cachedTwice = Seq.toList cached
let cachedEvaluatedAfter = cachedEvaluated
Seq.unfold generates a sequence from a state: the function returns the
next element and the next state, or None to stop:
let powersOfTwo = Seq.unfold (fun s -> Some (s, s * 2)) 1 |> Seq.take 6 |> Seq.toList
6 · Beyond let!
The other keywords of computation expressions, and!, match!, use!,
try and custom operations, map to the same method table.
All errors at once
Lecture 7 asked how to report all errors at once instead of stopping at
the first. and! binds two computations that do not depend on each
other, and the builder's MergeSources says how to combine them. With
errors as lists, two errors are appended (the @ fixes the error type
to a list):
type ValidationBuilder () =
member _.Bind (r, f) = Result.bind f r
member _.Return x = Ok x
member _.MergeSources (a, b) =
match a, b with
| Ok x, Ok y -> Ok (x, y)
| Error e1, Error e2 -> Error (e1 @ e2)
| Error e, _ | _, Error e -> Error e
let validation = ValidationBuilder ()
Two checks with and!
A check for the name and one for the email, each returning its error in
a list, and a computation that runs both:
let checkName (r: Request) =
if r.name = "" then
Error ["Name must not be blank"]
else Ok r.name
let checkEmail (r: Request) =
if r.email.Contains '@' then Ok r.email
else Error [$"Email {r.email} is not valid"]
let validate (r: Request) =
validation {
let! name = checkName r
and! email = checkEmail r
return (name, email)
}
let badRequest = { request with name = ""; email = "nobody" }
let bothErrors = validate badRequest
Error ["Name must not be blank"; "Email nobody is not valid"]
|
let bothOk = validate request
Ok ("Kati Karu", " Kati.Karu@TalTech.ee ")
|
Delay in the built-in builders
async { } and task { } are library builders (Lecture 12). They differ
in whether the body is delayed. A print between the definition and the
start of each shows the order:
let later = async { printfn "running (async)"; return 1 }
printfn "defined (async)"
let ran = Async.RunSynchronously later
printfn "ran (async): %d" ran
let now = task { printfn "running (task)"; return 1 }
printfn "defined (task)"
printfn "ran (task): %d" now.Result
defined (async)
running (async)
ran (async): 1
running (task)
defined (task)
ran (task): 1
|
async has a Delay: its body is a function that runs when the
computation is started, so "defined" is printed before "running". task
starts its body at once, so "running" comes first. Lecture 12 is about
these two.
match!, use!, try
-
match! e with … is let! followed by a match on the result, so it
needs Bind.
-
use! x = e is a let! whose value is disposed at the end, through
Using.
-
try … with and try … finally inside a computation expression call
TryWith and TryFinally, with the body delayed.
Custom operations
A builder may define its own keywords. A member marked
[<CustomOperation("select")>] makes select usable in the body; the
compiler passes it the sequence built so far:
type SelectSeqBuilder () =
member _.For (xs: 'a seq, f: 'a -> 'b seq) = Seq.collect f xs
member _.Yield x = Seq.singleton x
[<CustomOperation("select")>]
member _.Select (xs: 'a seq, f: 'a -> 'b) = Seq.map f xs
let selseq = SelectSeqBuilder ()
let selected = selseq { for i in 1 .. 10 do select (fun i -> i + 100) } |> Seq.toList
[101; 102; 103; 104; 105; 106; 107; 108; 109; 110]
|
query { } is a library builder made of custom operations (where,
select, sortBy, …). Two more attributes on custom operations are in
worked example C.
The method table
The methods a builder may define, from the F# language reference, with
the construct each serves:
Bind
|
M<'T> * ('T -> M<'U>) -> M<'U>
|
let!, do!
|
BindN (Bind3, …)
|
M<'T1> * … * M<'TN> * ('T1 * … * 'TN -> M<'U>) -> M<'U>
|
let! … and! without merging
|
Delay
|
(unit -> M<'T>) -> Delayed<'T>
|
wraps the body as a function |
Return
|
'T -> M<'T>
|
return
|
ReturnFrom
|
M<'T> -> M<'T>
|
return!
|
ReturnFromFinal
|
M<'T> -> M<'T>
|
return! and do! in tail position
|
BindReturn
|
M<'T1> * ('T1 -> 'T2) -> M<'T2>
|
let! … return
|
BindNReturn (Bind3Return, …)
|
M<'T1> * … * M<'TN> * ('T1 * … * 'TN -> M<'U>) -> M<'U>
|
let! … and! … return without merging
|
MergeSources
|
M<'T1> * M<'T2> -> M<'T1 * 'T2>
|
and!
|
MergeSourcesN (MergeSources3, …)
|
M<'T1> * … * M<'TN> -> M<'T1 * … * 'TN>
|
and! with fewer tuples
|
Run
|
Delayed<'T> -> M<'T> or M<'T> -> 'T
|
runs the whole expression |
Combine
|
M<'T> * Delayed<'T> -> M<'T> or M<unit> * M<'T> -> M<'T>
|
one part followed by another |
For
|
seq<'T> * ('T -> M<'U>) -> M<'U>
|
for … do
|
TryFinally
|
Delayed<'T> * (unit -> unit) -> M<'T>
|
try … finally
|
TryWith
|
Delayed<'T> * (exn -> M<'T>) -> M<'T>
|
try … with
|
Using
|
'T * ('T -> M<'U>) -> M<'U> when 'T :> IDisposable
|
use, use!
|
While
|
(unit -> bool) * Delayed<'T> -> M<'T>
|
while … do
|
Yield
|
'T -> M<'T>
|
yield
|
YieldFrom
|
M<'T> -> M<'T>
|
yield!
|
YieldFromFinal
|
M<'T> -> M<'T>
|
yield! in tail position
|
Zero
|
unit -> M<'T>
|
an if without else, a body without a result |
Quote
|
a quotation of 'T in, a quotation out |
passes the body to Run as a quotation |
Delayed<'T> is whatever Delay returns; usually M<'T> itself or
unit -> M<'T>. A builder defines the methods its users' bodies need
and no more; the compiler names the next one.
Why it matters: the keywords you will meet in library code, in async,
task, seq and query, all map to this one table.
Summary
-
A computation expression is translated into calls of a builder's
methods.
let! is Bind and return is Return.
-
The builder decides what the chain means: no result, an error, a
continuation, a sequence.
- The compiler names the method a construct needs.
- Sequence expressions are the same mechanism and are lazy.
Homework, reading and next week
Homework 8 is out this week.
Reading:
The 2025 version of this lecture drew on Tomas Petricek's meetup deck on
computation expressions; the logging, rounding and continuation builders
come from there and from the 2025 script.
Next week: events and asynchronous computations.
Worked examples
Complete, evaluated versions of three builders the lecture only named.
A. The rounding workflow
A builder is a set of methods, not necessarily a type constructor. Here
M<'T> is float itself: Bind rounds the value and passes it on,
Return rounds the result.
type RoundingWorkflow (sigDigs: int) =
let round (x: float) = System.Math.Round (x, sigDigs)
member _.Bind (x: float, rest: float -> float) = rest (round x)
member _.Return (x: float) = round x
let withPrecision sigDigs = RoundingWorkflow sigDigs
let rounded =
withPrecision 5 {
let! x = 2.0 / 12.0
let! y = 3.5
return x / y
}
let unrounded = 2.0 / 12.0 / 3.5
x was rounded to 0.16667 before the division, so the two values
differ in the sixth digit as well as in length.
B. A generator for a two-case union
Lecture 10's generators, with return!: Gen.frequency chooses between
two constant generators with weights 3 and 1, and return! returns that
generator's value instead of wrapping a plain one.
type 'a Box =
| Whitebox of 'a
| Blackbox of 'a
let intArb = ArbMap.arbitrary<int> ArbMap.defaults
let boxGen (contents: Arbitrary<'a>) =
gen {
let! a = contents.Generator
return! Gen.frequency [ (3, Gen.constant (Whitebox a)); (1, Gen.constant (Blackbox a)) ]
}
let boxSample = Gen.sampleWithSeed seed 10 6 (boxGen intArb)
[|Whitebox -9; Blackbox 5; Whitebox -10; Whitebox -3; Whitebox -1; Whitebox -6|]
|
Gen.listOf lifts a generator to lists, and Prop.forAll with
Arb.fromGen checks a property over that generator (Lecture 10), under a
fixed seed as before:
let revRevBox (xs: int Box list) = List.rev (List.rev xs) = xs
let seeded = Config.Quick.WithReplay (Some { Rnd = seed; Size = None })
Check.One (seeded, Prop.forAll (Arb.fromGen (Gen.listOf (boxGen intArb))) revRevBox)
C. Custom operations with projection and variable space
The language specification's where operation on a sequence builder.
[<ProjectionParameter>] lets the body write where (i > 5) instead of
where (fun i -> i > 5): the compiler builds the function from the
variables in scope. MaintainsVariableSpace = true keeps those variables
available after the operation, so a let between the for and the
where stays in scope for a second where.
type WhereSeqBuilder () =
member _.For (xs: 'a seq, f: 'a -> 'b seq) = Seq.collect f xs
member _.Yield x = Seq.singleton x
[<CustomOperation("where", MaintainsVariableSpace = true)>]
member _.Where (xs: 'a seq, [<ProjectionParameter>] f: 'a -> bool) = Seq.filter f xs
let whereseq = WhereSeqBuilder ()
let whereProjected = whereseq { for i in 1 .. 10 do where (i > 5) } |> Seq.toList
let whereTwice =
whereseq {
for i in 1 .. 10 do
let j = i * i
where (i > 5)
where (j < 49)
}
|> Seq.toList
With the variable space maintained, the elements of the result are the
variables in scope, the pairs (i, j); only (6, 36) passes both
conditions.
Exercises
Specifications only; no solutions here. Each exercise states the
expressions that must compile and their values; a hidden reference
checks them when these notes are built.
Exercise 1: return! and an empty result for option
Extend OptionBuilder with ReturnFrom and Zero, so that
option { return! Some 3 } is Some 3;
option { if false then return 1 } is None.
Question: what is the type of Zero's result, and why does the compiler
accept it in the if without else?
Exercise 2: Delay for the continuation builder
Extend CPSBuilder with Delay, so that the body of sizeC is built
only when the continuation arrives. The signature is
Delay : (unit -> ('a -> 'r) -> 'r) -> ('a -> 'r) -> 'r.
runCPS (sizeC t) is still 6;
-
runCPS (sizeC deep) is 1000000, in a separate F# Interactive
session (without Delay it overflows the stack, so run the one with
Delay only).
Question: which argument of Bind is now evaluated late, and what does
Delay do with the function it receives?
Exercise 3: a complete sequence builder
Extend MySeqBuilder with Combine, Delay and Zero, so that
myseq { yield 1; yield 2 } |> Seq.toList is [1; 2];
myseq { if false then yield 1 } |> Seq.toList is [];
myseq { for i in 0 .. 3 -> (i, i * i) } is unchanged.
Question: with Delay f = f (), is your sequence still lazy? What would
Delay have to return for the body to be deferred, and what would
Combine then take as its second argument?
Appendix: computation expressions as DSLs
Auxiliary material for the end of the lecture: two uses of the mechanism
as a domain-specific language ("DSL"), where the keywords of the body
are the builder's custom operations and the builder decides what a
"program" in the body means.
An IL DSL
Keith Battocchi's IL DSL (shown in the 2025 lecture) lets a computation
expression read like .NET intermediate-language assembly. Each line is a
custom operation, and the function the expression denotes returns 42
when called:
let fortyTwoFn =
il {
ldc_i4 6
ldc_i4_0
ldc_i4 7
add
mul
ret
}
> fortyTwoFn ();;
val it: int = 42
|
An IL DSL: the builder
A computation is a function that emits instructions into an
ILGenerator. Its type parameter records the shape of the evaluation
stack (unit for empty, int * rest for an int on top), so an add
on a stack with one integer does not type-check. A body that starts with
a custom operation starts from Yield (), the empty stack:
open System.Reflection.Emit
type 'a Stack = Stack of (ILGenerator -> unit)
type 'a Completed = Completed of (ILGenerator -> unit)
type ILBuilder () =
member _.Yield (() : unit) : unit Stack = Stack (fun _ -> ())
[<CustomOperation("ldc_i4")>]
member _.Ldc_i4 (Stack f : 'r Stack, n: int) : (int * 'r) Stack =
Stack (fun ilg -> f ilg; ilg.Emit (OpCodes.Ldc_I4, n))
[<CustomOperation("ldc_i4_0")>]
member _.Ldc_i4_0 (Stack f : 'r Stack) : (int * 'r) Stack =
Stack (fun ilg -> f ilg; ilg.Emit OpCodes.Ldc_I4_0)
// stack transition: int :: int :: rest -> int :: rest
[<CustomOperation("add")>]
member _.Add (Stack f : (int * (int * 'r)) Stack) : (int * 'r) Stack =
Stack (fun ilg -> f ilg; ilg.Emit OpCodes.Add)
[<CustomOperation("mul")>]
member _.Mul (Stack f : (int * (int * 'r)) Stack) : (int * 'r) Stack =
Stack (fun ilg -> f ilg; ilg.Emit OpCodes.Mul)
[<CustomOperation("ret")>]
member _.Ret (Stack f : ('a * unit) Stack) : 'a Completed =
Completed (fun ilg -> f ilg; ilg.Emit OpCodes.Ret)
member _.Run (Completed f : 'a Completed) : unit -> 'a =
let dm = DynamicMethod ("", typeof<'a>, [||])
dm.GetILGenerator () |> f
let d = dm.CreateDelegate typeof<System.Func<'a>> :?> System.Func<'a>
fun () -> d.Invoke ()
let il = ILBuilder ()
An IL DSL: running it
ret accepts only a stack with exactly one value and turns the
computation into a Completed one; Run, called by the compiler on the
whole translated body, compiles the emitted instructions into a dynamic
method and wraps it as an F# function:
let fortyTwoFn =
il {
ldc_i4 6
ldc_i4_0
ldc_i4 7
add
mul
ret
}
let fortyTwo = fortyTwoFn ()
DSLs you will meet
Library builders whose bodies are domain-specific languages, all made of
the same methods and custom operations:
-
query { } in FSharp.Core, with where, select, sortBy, join as
custom operations, translated for a database by LINQ:
query {
for student in db.Student do
where (student.ID = 1)
select student
}
|
-
FsToolkit.ErrorHandling: result { }, option { }, validation { }
(with and!) and asyncResult { }, the builders of this lecture as
a library.
-
Saturn, a web framework: application { use_router webApp; url "http://0.0.0.0:8085/" }
and router { get "/" (text "hello") }.
Farmer, Azure deployments as F#: arm { location Location.NorthEurope; add_resource webApp }.
Expecto, a test framework: test "name" { Expect.equal (f 2) 4 "f 2" }.
namespace Itt8060
module Diagrams
from Itt8060
val scaled: factor: float -> Svg -> Svg
val factor: float
Multiple items
val float: value: 'T -> float (requires member op_Explicit)
--------------------
type float = System.Double
--------------------
type float<'Measure> =
float
Multiple items
union case Svg.Svg: string -> Svg
--------------------
type Svg = | Svg of string
A rendered SVG fragment (inline-embeddable, standalone-saveable).
val s: string
val widthAttr: System.Text.RegularExpressions.Regex
namespace System
namespace System.Text
namespace System.Text.RegularExpressions
Multiple items
type Regex =
interface ISerializable
new: pattern: string -> unit + 2 overloads
member Count: input: string -> int + 8 overloads
member EnumerateMatches: input: ReadOnlySpan<char> -> ValueMatchEnumerator + 4 overloads
member EnumerateSplits: input: ReadOnlySpan<char> -> ValueSplitEnumerator + 5 overloads
member GetGroupNames: unit -> string array
member GetGroupNumbers: unit -> int array
member GroupNameFromNumber: i: int -> string
member GroupNumberFromName: name: string -> int
member IsMatch: input: ReadOnlySpan<char> -> bool + 9 overloads
...
<summary>Represents an immutable regular expression.</summary>
--------------------
System.Text.RegularExpressions.Regex( pattern: string) : System.Text.RegularExpressions.Regex
System.Text.RegularExpressions.Regex( pattern: string, options: System.Text.RegularExpressions.RegexOptions) : System.Text.RegularExpressions.Regex
System.Text.RegularExpressions.Regex( pattern: string, options: System.Text.RegularExpressions.RegexOptions, matchTimeout: System.TimeSpan) : System.Text.RegularExpressions.Regex
val w: int
Multiple items
val int: value: 'T -> int (requires member op_Explicit)
--------------------
type int = int32
--------------------
type int<'Measure> =
int
System.Text.RegularExpressions.Regex.Match(input: string) : System.Text.RegularExpressions.Match
System.Text.RegularExpressions.Regex.Match(input: string, startat: int) : System.Text.RegularExpressions.Match
System.Text.RegularExpressions.Regex.Match(input: string, beginning: int, length: int) : System.Text.RegularExpressions.Match
System.Text.RegularExpressions.Regex.Replace(input: string, evaluator: System.Text.RegularExpressions.MatchEvaluator) : string
System.Text.RegularExpressions.Regex.Replace(input: string, replacement: string) : string
System.Text.RegularExpressions.Regex.Replace(input: string, evaluator: System.Text.RegularExpressions.MatchEvaluator, count: int) : string
System.Text.RegularExpressions.Regex.Replace(input: string, replacement: string, count: int) : string
System.Text.RegularExpressions.Regex.Replace(input: string, evaluator: System.Text.RegularExpressions.MatchEvaluator, count: int, startat: int) : string
System.Text.RegularExpressions.Regex.Replace(input: string, replacement: string, count: int, startat: int) : string
val saveScaled: path: string -> factor: float -> svg: Svg -> unit
val path: string
Multiple items
val string: value: 'T -> string
--------------------
type string = System.String
val svg: Svg
val save: path: string -> Svg -> unit
Save a diagram for use from slide decks: `Diagrams.save "img/list567.svg" (consCells ...)`.
Paths are relative to the lecture directory when evaluated by the build.
val figTranslation: Svg
val tree: root: Tree -> Svg
Renders a labelled tree top-down, e.g.
`tree (Node("+", [leaf "1"; Node("*", [leaf "2"; leaf "3"])]))`.
union case Tree.Node: label: string * children: Tree list -> Tree
val leaf: label: string -> Tree
Shorthand for a leaf.
namespace FsCheck
namespace FsCheck.FSharp
val seed: Rnd
Multiple items
type Rnd =
new: seed: uint64 * gamma: uint64 -> Rnd + 1 overload
val Seed: uint64
val Gamma: uint64
override ToString: unit -> string
--------------------
Rnd ()
new: seed: uint64 -> Rnd
new: seed: uint64 * gamma: uint64 -> Rnd
val tryParse: s: string -> int option
type Int32 =
member CompareTo: value: int -> int + 1 overload
member Equals: obj: int -> bool + 1 overload
member GetHashCode: unit -> int
member GetTypeCode: unit -> TypeCode
member ToString: unit -> string + 3 overloads
member TryFormat: utf8Destination: Span<byte> * bytesWritten: byref<int> * ?format: ReadOnlySpan<char> * ?provider: IFormatProvider -> bool + 1 overload
static member Abs: value: int -> int
static member BigMul: left: int * right: int -> int64
static member Clamp: value: int * min: int * max: int -> int
static member CopySign: value: int * sign: int -> int
...
<summary>Represents a 32-bit signed integer.</summary>
System.Int32.TryParse( s: string, result: byref<int>) : bool
System.Int32.TryParse(s: System.ReadOnlySpan<char>, result: byref<int>) : bool
System.Int32.TryParse(utf8Text: System.ReadOnlySpan<byte>, result: byref<int>) : bool
System.Int32.TryParse( s: string, provider: System.IFormatProvider, result: byref<int>) : bool
System.Int32.TryParse(s: System.ReadOnlySpan<char>, provider: System.IFormatProvider, result: byref<int>) : bool
System.Int32.TryParse(utf8Text: System.ReadOnlySpan<byte>, provider: System.IFormatProvider, result: byref<int>) : bool
System.Int32.TryParse( s: string, style: System.Globalization.NumberStyles, provider: System.IFormatProvider, result: byref<int>) : bool
System.Int32.TryParse(s: System.ReadOnlySpan<char>, style: System.Globalization.NumberStyles, provider: System.IFormatProvider, result: byref<int>) : bool
System.Int32.TryParse(utf8Text: System.ReadOnlySpan<byte>, style: System.Globalization.NumberStyles, provider: System.IFormatProvider, result: byref<int>) : bool
val n: int
union case Option.Some: Value: 'T -> Option<'T>
union case Option.None: Option<'T>
val tryDivide: n: int -> int option
val tryRoot: n: int -> float option
val sqrt: value: 'T -> 'U (requires member Sqrt)
val staircase: s: string -> (int * int * float) option
module Option
from Microsoft.FSharp.Core
val bind: binder: ('T -> 'U option) -> option: 'T option -> 'U option
val q: int
val r: float
val staircaseFour: (int * int * float) option
val staircaseWord: (int * int * float) option
val ordPairGen: Gen<int * int>
val gen: GenBuilder
<summary>
The computation expressions for generators: gen { ... }
</summary>
val j: int
Multiple items
module Gen
from FsCheck.FSharp
--------------------
type Gen<'T> =
private | Gen of (int -> Rnd -> struct ('T * Rnd))
interface IGen
<summary>
Generator of a random value, based on a size parameter and a randomly generated int.
</summary>
val choose: l: int * h: int -> Gen<int>
<summary>
Generates ints between l and h, inclusive.
</summary>
val i: int
val ordPairGen': Gen<int * int>
member GenBuilder.Bind: m: Gen<'T> * k: ('T -> Gen<'U>) -> Gen<'U>
member GenBuilder.Return: a: 'T -> Gen<'T>
val ordPairSample: (int * int) array
val sampleWithSeed: seed: Rnd -> size: int -> nbSamples: int -> Gen<'T> -> 'T array
<summary>
Generates n values of the given size and starting with the given seed.
</summary>
val ordPairSample': (int * int) array
val ordPairSame: bool
val ordPairGen'': Gen<int * int>
member GenBuilder.Delay: f: (unit -> Gen<'T>) -> Gen<'T>
member GenBuilder.BindReturn: x: Gen<'T> * f: ('T -> 'U) -> Gen<'U>
val ordPairSample'': (int * int) array
val ordPairSameElaborated: bool
Multiple items
type OptionBuilder =
new: unit -> OptionBuilder
member Bind: o: 'b option * f: ('b -> 'c option) -> 'c option
member Return: x: 'a -> 'a option
--------------------
new: unit -> OptionBuilder
val o: 'b option
val f: ('b -> 'c option)
val x: 'a
Multiple items
val option: OptionBuilder
--------------------
type 'T option = Option<'T>
val optionNone: int option
val x: int
val squareRoot: x: float -> float option
val x: float
val rootOfFive: float option
val five: float
val root: float
val rootOfMinusFive: float option
val minusFive: float
val rootAfterNone: float option
val missing: float
Multiple items
union case UserId.UserId: int -> UserId
--------------------
type UserId = | UserId of int
type UserId = | UserId of int
type Request =
{
userId: UserId
name: string
email: string
}
val request: Request
val nameNotBlank: r: Request -> Result<Request,string>
val r: Request
Request.name: string
union case Result.Error: ErrorValue: 'TError -> Result<'T,'TError>
union case Result.Ok: ResultValue: 'T -> Result<'T,'TError>
val name50: r: Request -> Result<Request,string>
property System.String.Length: int with get
val emailNotBlank: r: Request -> Result<Request,string>
Request.email: string
val emailHasAt: r: Request -> Result<Request,string>
System.String.Contains(value: string) : bool
System.String.Contains(value: char) : bool
System.String.Contains(value: string, comparisonType: System.StringComparison) : bool
System.String.Contains(value: char, comparisonType: System.StringComparison) : bool
val validateRequest: (Request -> Result<Request,string>)
Multiple items
module Result
from Microsoft.FSharp.Core
--------------------
type Result =
{
Outcome: Outcome
Stamp: string list
Labels: Set<string>
Arguments: obj list
}
<summary>
The result of one execution of a property.
</summary>
--------------------
type Result<'T,'TError> =
| Ok of ResultValue: 'T
| Error of ErrorValue: 'TError
val bind: binder: ('T -> Result<'U,'TError>) -> result: Result<'T,'TError> -> Result<'U,'TError>
Multiple items
type ResultBuilder =
new: unit -> ResultBuilder
member Bind: r: Result<'c,'d> * f: ('c -> Result<'e,'d>) -> Result<'e,'d>
member Return: x: 'a -> Result<'a,'b>
--------------------
new: unit -> ResultBuilder
val r: Result<'c,'d>
val f: ('c -> Result<'e,'d>)
val result: ResultBuilder
val validateRequest': r: Request -> Result<Request,string>
val r1: Request
val r2: Request
val r3: Request
val r4: Request
val chainSame: bool
val longName: Request
module String
from Microsoft.FSharp.Core
val replicate: count: int -> str: string -> string
val chainSameLong: bool
val longNameResult: Result<Request,string>
'a
Multiple items
union case Logging.Logging: 'a * string list -> 'a Logging
--------------------
type 'a Logging = | Logging of 'a * string list
type 'a Logging = | Logging of 'a * string list
type 'T list = List<'T>
Multiple items
type LoggingBuilder =
new: unit -> LoggingBuilder
member Bind: 'b Logging * f: ('b -> 'c Logging) -> 'c Logging
member Return: x: 'a -> 'a Logging
member Zero: unit -> unit Logging
--------------------
new: unit -> LoggingBuilder
val x: 'b
val msgs1: string list
val f: ('b -> 'c Logging)
val y: 'c
val msgs2: string list
val logging: LoggingBuilder
val log: msg: string -> unit Logging
val msg: string
val write: s: string -> unit Logging
val printfn: format: Printf.TextWriterFormat<'T> -> 'T
val written: unit Logging
val parse: s: string -> int Logging
val loggingTest: int Logging
type 'a BinTree =
| Empty
| Node of 'a BinTree * 'a * 'a BinTree
val leaf: x: 'a -> 'a BinTree
union case BinTree.Node: 'a BinTree * 'a * 'a BinTree -> 'a BinTree
union case BinTree.Empty: 'a BinTree
val t: int BinTree
val size: t: 'a BinTree -> int
val t: 'a BinTree
val l: 'a BinTree
val r: 'a BinTree
Multiple items
type CPSBuilder =
new: unit -> CPSBuilder
member Bind: c: (('c -> 'd) -> 'e) * f: ('c -> 'f -> 'd) -> ('f -> 'e)
member Return: x: 'a -> (('a -> 'b) -> 'b)
--------------------
new: unit -> CPSBuilder
val c: (('c -> 'd) -> 'e)
val f: ('c -> 'f -> 'd)
val k: 'f
val x: 'c
val k: ('a -> 'b)
val cps: CPSBuilder
val runCPS: c: (('a -> 'a) -> 'b) -> 'b
val c: (('a -> 'a) -> 'b)
val id: x: 'T -> 'T
val sizeC: t: 'a BinTree -> ((int -> 'b) -> 'b)
val sl: int
val sr: int
val sizeCT: int
val sizeSame: bool
val spine: n: int -> acc: int BinTree -> int BinTree
val acc: int BinTree
val deep: int BinTree
val seqOpener: (int * int) list
Multiple items
val seq: sequence: 'T seq -> 'T seq
--------------------
type 'T seq = System.Collections.Generic.IEnumerable<'T>
module Seq
from Microsoft.FSharp.Collections
val toList: source: 'T seq -> 'T list
Multiple items
type MySeqBuilder =
new: unit -> MySeqBuilder
member For: xs: 'a seq * f: ('a -> 'b seq) -> 'b seq
member Yield: x: 'a -> 'a seq
--------------------
new: unit -> MySeqBuilder
val xs: 'a seq
val f: ('a -> 'b seq)
'b
val collect: mapping: ('T -> #seq<'U>) -> source: 'T seq -> 'U seq
val singleton: value: 'T -> 'T seq
val myseq: MySeqBuilder
val myseqOpener: (int * int) list
val openerSame: bool
val mutable evaluated: int
val squares: int seq
val evaluatedBefore: int
val squaresList: int list
val evaluatedAfter: int
val from: n: int -> int seq
val fromTen: int list
val take: count: int -> source: 'T seq -> 'T seq
val mutable forced: int
val lazyValue: Lazy<int>
val forcedBefore: int
val lazyForced: int
member System.Lazy.Force: unit -> 'T
val lazyForcedAgain: int
val forcedAfter: int
val mutable cachedEvaluated: int
val cached: int seq
val cache: source: 'T seq -> 'T seq
val cachedOnce: int list
val cachedTwice: int list
val cachedEvaluatedAfter: int
val powersOfTwo: int list
val unfold: generator: ('State -> ('T * 'State) option) -> state: 'State -> 'T seq
val s: int
Multiple items
type ValidationBuilder =
new: unit -> ValidationBuilder
member Bind: r: Result<'f,'g> * f: ('f -> Result<'h,'g>) -> Result<'h,'g>
member MergeSources: a: Result<'a,'b list> * b: Result<'c,'b list> -> Result<('a * 'c),'b list>
member Return: x: 'd -> Result<'d,'e>
--------------------
new: unit -> ValidationBuilder
val r: Result<'f,'g>
val f: ('f -> Result<'h,'g>)
val x: 'd
val a: Result<'a,'b list>
val b: Result<'c,'b list>
val e1: 'b list
val e2: 'b list
val e: 'b list
val validation: ValidationBuilder
val checkName: r: Request -> Result<string,string list>
val checkEmail: r: Request -> Result<string,string list>
val validate: r: Request -> Result<(string * string),string list>
val name: string
val email: string
val badRequest: Request
val bothErrors: Result<(string * string),string list>
val bothOk: Result<(string * string),string list>
val later: Async<int>
val async: AsyncBuilder
val ran: int
Multiple items
type Async =
static member AsBeginEnd: computation: ('Arg -> Async<'T>) -> ('Arg * AsyncCallback * objnull -> IAsyncResult) * (IAsyncResult -> 'T) * (IAsyncResult -> unit)
static member AwaitEvent: event: IEvent<'Del,'T> * ?cancelAction: (unit -> unit) -> Async<'T> (requires delegate and 'Del :> Delegate and 'Del: not null)
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 * objnull -> 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.RunSynchronously: computation: Async<'T> * ?timeout: int * ?cancellationToken: System.Threading.CancellationToken -> 'T
val now: System.Threading.Tasks.Task<int>
val task: TaskBuilder
property System.Threading.Tasks.Task.Result: int with get
Multiple items
type SelectSeqBuilder =
new: unit -> SelectSeqBuilder
member For: xs: 'a seq * f: ('a -> 'b seq) -> 'b seq
member Select: xs: 'a seq * f: ('a -> 'b) -> 'b seq
member Yield: x: 'a -> 'a seq
--------------------
new: unit -> SelectSeqBuilder
Multiple items
type CustomOperationAttribute =
inherit Attribute
new: name: string -> CustomOperationAttribute + 1 overload
member AllowIntoPattern: bool with get, set
member IsLikeGroupJoin: bool with get, set
member IsLikeJoin: bool with get, set
member IsLikeZip: bool with get, set
member JoinConditionWord: string with get, set
member MaintainsVariableSpace: bool with get, set
member MaintainsVariableSpaceUsingBind: bool with get, set
member Name: string
--------------------
new: unit -> CustomOperationAttribute
new: name: string -> CustomOperationAttribute
val f: ('a -> 'b)
val map: mapping: ('T -> 'U) -> source: 'T seq -> 'U seq
val selseq: SelectSeqBuilder
val selected: int list
custom operation: select ('a -> 'b)
Calls SelectSeqBuilder.Select
Multiple items
type RoundingWorkflow =
new: sigDigs: int -> RoundingWorkflow
member Bind: x: float * rest: (float -> float) -> float
member Return: x: float -> float
--------------------
new: sigDigs: int -> RoundingWorkflow
val sigDigs: int
val round: x: float -> float
type Math =
static member Abs: value: decimal -> decimal + 7 overloads
static member Acos: d: float -> float
static member Acosh: d: float -> float
static member Asin: d: float -> float
static member Asinh: d: float -> float
static member Atan: d: float -> float
static member Atan2: y: float * x: float -> float
static member Atanh: d: float -> float
static member BigMul: a: int * b: int -> int64 + 5 overloads
static member BitDecrement: x: float -> float
...
<summary>Provides constants and static methods for trigonometric, logarithmic, and other common mathematical functions.</summary>
System.Math.Round(a: float) : float
System.Math.Round(d: decimal) : decimal
System.Math.Round(value: float, mode: System.MidpointRounding) : float
System.Math.Round(value: float, digits: int) : float
System.Math.Round(d: decimal, mode: System.MidpointRounding) : decimal
System.Math.Round(d: decimal, decimals: int) : decimal
System.Math.Round(value: float, digits: int, mode: System.MidpointRounding) : float
System.Math.Round(d: decimal, decimals: int, mode: System.MidpointRounding) : decimal
val rest: (float -> float)
val withPrecision: sigDigs: int -> RoundingWorkflow
val rounded: float
val y: float
val unrounded: float
type 'a Box =
| Whitebox of 'a
| Blackbox of 'a
val intArb: Arbitrary<int>
module ArbMap
from FsCheck.FSharp
val arbitrary: arbMap: IArbMap -> Arbitrary<'T>
val defaults: IArbMap
<summary>
The immutable default mapping from a type to Arbitrary for that type.
</summary>
val boxGen: contents: Arbitrary<'a> -> Gen<'a Box>
val contents: Arbitrary<'a>
Multiple items
type Arbitrary<'T> =
interface IArbitrary
new: unit -> Arbitrary<'T>
abstract Shrinker: 'T -> 'T seq + 1 overload
abstract Generator: Gen<'T>
--------------------
new: unit -> Arbitrary<'T>
val a: 'a
property Arbitrary.Generator: Gen<'a> with get
<summary>
Returns a generator for 'a.
</summary>
val frequency: dist: (int * Gen<'T>) seq -> Gen<'T>
<summary>
Build a generator that generates a value from one of the generators in the given non-empty seq, with
given probabilities. The sum of the probabilities must be larger than zero.
</summary>
<param name="dist">Sequence of tuples where each tuple contains a weight and a generator.</param>
<exception cref="System.ArgumentException">Thrown if the sum of the probabilities is less than or equal to 0.</exception>
val constant: value: 'T -> Gen<'T>
<summary>
Always generate the same given value. See also fresh.
</summary>
union case Box.Whitebox: 'a -> 'a Box
union case Box.Blackbox: 'a -> 'a Box
val boxSample: int Box array
val revRevBox: xs: int Box list -> bool
val xs: int Box list
Multiple items
module List
from Microsoft.FSharp.Collections
--------------------
type List<'T> =
| op_Nil
| op_ColonColon of Head: 'T * Tail: 'T list
interface IReadOnlyList<'T>
interface IReadOnlyCollection<'T>
interface IEnumerable
interface IEnumerable<'T>
member GetReverseIndex: rank: int * offset: int -> int
member GetSlice: startIndex: int option * endIndex: int option -> 'T list
static member Cons: head: 'T * tail: 'T list -> 'T list
member Head: 'T
member IsEmpty: bool
member Item: index: int -> 'T with get
...
val rev: list: 'T list -> 'T list
val seeded: Config
type Config =
private | Config of {| ArbMap: IArbMap; EndSize: int; Every: (int -> obj list -> string); EveryShrink: (obj list -> string); MaxRejected: int; MaxTest: int; Name: string; ParallelRunConfig: ParallelRunConfig option; QuietOnSuccess: bool; Replay: Replay option; Runner: IRunner; StartSize: int |}
member WithArbitrary: arbitrary: #Type seq -> Config
member WithEndSize: endSize: int -> Config
member WithEvery: every: (int -> obj list -> string) -> Config
member WithEveryShrink: everyShrink: (obj list -> string) -> Config
member WithMaxRejected: maxRejected: int -> Config
member WithMaxTest: maxTest: int -> Config
member WithName: name: string -> Config
member WithParallelRunConfig: config: ParallelRunConfig option -> Config
member WithQuietOnSuccess: quietOnSuccess: bool -> Config
member WithReplay: replay: Replay option -> Config
...
<summary>
For configuring a run.
</summary>
property Config.Quick: Config with get
<summary>
The quick configuration only prints a summary result at the end of the test.
</summary>
member Config.WithReplay: replay: Replay option -> Config
static member ConfigExtensions.WithReplay: config: Config * seed: uint64 * gamma: uint64 -> Config
static member ConfigExtensions.WithReplay: config: Config * seed: uint64 * gamma: uint64 * size: int -> Config
type Check =
static member All: config: Config * test: Type -> unit + 1 overload
static member Method: config: Config * methodInfo: MethodInfo * ?target: obj -> unit
static member One: config: Config * property: 'Testable -> unit + 1 overload
static member Quick: property: 'Testable -> unit + 1 overload
static member QuickAll: test: Type -> unit + 1 overload
static member QuickThrowOnFailure: property: 'Testable -> unit
static member QuickThrowOnFailureAll: test: Type -> unit + 1 overload
static member Verbose: property: 'Testable -> unit + 1 overload
static member VerboseAll: test: Type -> unit + 1 overload
static member VerboseThrowOnFailure: property: 'Testable -> unit
...
static member Check.One: config: Config * property: 'Testable -> unit
static member Check.One: name: string * config: Config * property: 'Testable -> unit
module Prop
from FsCheck.FSharp
<summary>
Combinators to build properties, which define the property to be tested, with some
convenience methods to investigate the generated arguments and any found counter-examples.
</summary>
val forAll: arb: Arbitrary<'Value> -> body: ('Value -> 'Testable) -> Property
<summary>
Quantified property combinator. Provide a custom test data generator to a property.
</summary>
module Arb
from FsCheck.FSharp
val fromGen: gen: Gen<'Value> -> Arbitrary<'Value>
<summary>
Construct an Arbitrary instance from a generator.
Shrink is not supported for this type.
</summary>
val listOf: gen: Gen<'T> -> Gen<'T list>
<summary>
Generates lists of random lengths between zero and size.
</summary>
Multiple items
type WhereSeqBuilder =
new: unit -> WhereSeqBuilder
member For: xs: 'a seq * f: ('a -> 'b seq) -> 'b seq
member Where: xs: 'a seq * f: ('a -> bool) -> 'a seq
member Yield: x: 'a -> 'a seq
--------------------
new: unit -> WhereSeqBuilder
Multiple items
type ProjectionParameterAttribute =
inherit Attribute
new: unit -> ProjectionParameterAttribute
--------------------
new: unit -> ProjectionParameterAttribute
val f: ('a -> bool)
type bool = System.Boolean
val filter: predicate: ('T -> bool) -> source: 'T seq -> 'T seq
val whereseq: WhereSeqBuilder
val whereProjected: int list
custom operation: where (bool)
Calls WhereSeqBuilder.Where
val whereTwice: (int * int) list
namespace System.Reflection
namespace System.Reflection.Emit
Multiple items
union case Stack.Stack: (ILGenerator -> unit) -> 'a Stack
--------------------
type 'a Stack = | Stack of (ILGenerator -> unit)
type 'a Stack = | Stack of (ILGenerator -> unit)
type ILGenerator =
override BeginCatchBlock: exceptionType: Type -> unit
override BeginExceptFilterBlock: unit -> unit
override BeginExceptionBlock: unit -> Label
override BeginFaultBlock: unit -> unit
override BeginFinallyBlock: unit -> unit
override BeginScope: unit -> unit
member DeclareLocal: localType: Type -> LocalBuilder + 1 overload
override DefineLabel: unit -> Label
override Emit: opcode: OpCode -> unit + 16 overloads
override EmitCall: opcode: OpCode * methodInfo: MethodInfo * optionalParameterTypes: Type array -> unit
...
<summary>Generates Microsoft intermediate language (MSIL) instructions.</summary>
type unit = Unit
Multiple items
union case Completed.Completed: (ILGenerator -> unit) -> 'a Completed
--------------------
type 'a Completed = | Completed of (ILGenerator -> unit)
type 'a Completed = | Completed of (ILGenerator -> unit)
Multiple items
type ILBuilder =
new: unit -> ILBuilder
member Add: (int * (int * 'r)) Stack -> (int * 'r) Stack
member Ldc_i4: 'r Stack * n: int -> (int * 'r) Stack
member Ldc_i4_0: 'r Stack -> (int * 'r) Stack
member Mul: (int * (int * 'r)) Stack -> (int * 'r) Stack
member Ret: ('a * unit) Stack -> 'a Completed
member Run: 'a Completed -> (unit -> 'a)
member Yield: unit -> unit Stack
--------------------
new: unit -> ILBuilder
val f: (ILGenerator -> unit)
'r
val ilg: ILGenerator
ILGenerator.Emit(opcode: OpCode) : unit
(+0 other overloads)
ILGenerator.Emit(opcode: OpCode, cls: System.Type) : unit
(+0 other overloads)
ILGenerator.Emit(opcode: OpCode, str: string) : unit
(+0 other overloads)
ILGenerator.Emit(opcode: OpCode, arg: float32) : unit
(+0 other overloads)
ILGenerator.Emit(opcode: OpCode, arg: sbyte) : unit
(+0 other overloads)
ILGenerator.Emit(opcode: OpCode, meth: System.Reflection.MethodInfo) : unit
(+0 other overloads)
ILGenerator.Emit(opcode: OpCode, field: System.Reflection.FieldInfo) : unit
(+0 other overloads)
ILGenerator.Emit(opcode: OpCode, signature: SignatureHelper) : unit
(+0 other overloads)
ILGenerator.Emit(opcode: OpCode, local: LocalBuilder) : unit
(+0 other overloads)
ILGenerator.Emit(opcode: OpCode, labels: Label array) : unit
(+0 other overloads)
type OpCodes =
static member TakesSingleByteArgument: inst: OpCode -> bool
static val Add: OpCode
static val Add_Ovf: OpCode
static val Add_Ovf_Un: OpCode
static val And: OpCode
static val Arglist: OpCode
static val Beq: OpCode
static val Beq_S: OpCode
static val Bge: OpCode
static val Bge_S: OpCode
...
<summary>Provides field representations of the Microsoft Intermediate Language (MSIL) instructions for emission by the <see cref="T:System.Reflection.Emit.ILGenerator" /> class members (such as <see cref="M:System.Reflection.Emit.ILGenerator.Emit(System.Reflection.Emit.OpCode)" />).</summary>
field OpCodes.Ldc_I4: OpCode
<summary>Pushes a supplied value of type <see langword="int32" /> onto the evaluation stack as an <see langword="int32" />.</summary>
field OpCodes.Ldc_I4_0: OpCode
<summary>Pushes the integer value of 0 onto the evaluation stack as an <see langword="int32" />.</summary>
field OpCodes.Add: OpCode
<summary>Adds two values and pushes the result onto the evaluation stack.</summary>
field OpCodes.Mul: OpCode
<summary>Multiplies two values and pushes the result on the evaluation stack.</summary>
field OpCodes.Ret: OpCode
<summary>Returns from the current method, pushing a return value (if present) from the callee's evaluation stack onto the caller's evaluation stack.</summary>
val dm: DynamicMethod
Multiple items
type DynamicMethod =
inherit MethodInfo
new: name: string * attributes: MethodAttributes * callingConvention: CallingConventions * returnType: Type * parameterTypes: Type array * m: Module * skipVisibility: bool -> unit + 7 overloads
member CreateDelegate: delegateType: Type -> Delegate + 1 overload
member DefineParameter: position: int * attributes: ParameterAttributes * parameterName: string -> ParameterBuilder
member GetBaseDefinition: unit -> MethodInfo
member GetCustomAttributes: ``inherit`` : bool -> obj array + 1 overload
member GetDynamicILInfo: unit -> DynamicILInfo
member GetILGenerator: unit -> ILGenerator + 1 overload
member GetMethodImplementationFlags: unit -> MethodImplAttributes
member GetParameters: unit -> ParameterInfo array
...
<summary>Defines and represents a dynamic method that can be compiled, executed, and discarded. Discarded methods are available for garbage collection.</summary>
--------------------
DynamicMethod(name: string, returnType: System.Type, parameterTypes: System.Type array) : DynamicMethod
DynamicMethod(name: string, returnType: System.Type, parameterTypes: System.Type array, restrictedSkipVisibility: bool) : DynamicMethod
DynamicMethod(name: string, returnType: System.Type, parameterTypes: System.Type array, m: System.Reflection.Module) : DynamicMethod
DynamicMethod(name: string, returnType: System.Type, parameterTypes: System.Type array, owner: System.Type) : DynamicMethod
DynamicMethod(name: string, returnType: System.Type, parameterTypes: System.Type array, m: System.Reflection.Module, skipVisibility: bool) : DynamicMethod
DynamicMethod(name: string, returnType: System.Type, parameterTypes: System.Type array, owner: System.Type, skipVisibility: bool) : DynamicMethod
DynamicMethod(name: string, attributes: System.Reflection.MethodAttributes, callingConvention: System.Reflection.CallingConventions, returnType: System.Type, parameterTypes: System.Type array, m: System.Reflection.Module, skipVisibility: bool) : DynamicMethod
DynamicMethod(name: string, attributes: System.Reflection.MethodAttributes, callingConvention: System.Reflection.CallingConventions, returnType: System.Type, parameterTypes: System.Type array, owner: System.Type, skipVisibility: bool) : DynamicMethod
val typeof<'T> : System.Type
DynamicMethod.GetILGenerator() : ILGenerator
DynamicMethod.GetILGenerator(streamSize: int) : ILGenerator
val d: System.Func<'a>
System.Reflection.MethodInfo.CreateDelegate<'T (requires 'T :> System.Delegate)>() : 'T
System.Reflection.MethodInfo.CreateDelegate<'T (requires 'T :> System.Delegate)>(target: obj) : 'T
DynamicMethod.CreateDelegate(delegateType: System.Type) : System.Delegate
DynamicMethod.CreateDelegate(delegateType: System.Type, target: obj) : System.Delegate
Multiple items
type Func<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10,'T11,'T12,'T13,'T14,'T15,'T16,'TResult (allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct)> =
new: object: obj * method: nativeint -> unit
member BeginInvoke: arg1: 'T1 * arg2: 'T2 * arg3: 'T3 * arg4: 'T4 * arg5: 'T5 * arg6: 'T6 * arg7: 'T7 * arg8: 'T8 * arg9: 'T9 * arg10: 'T10 * arg11: 'T11 * arg12: 'T12 * arg13: 'T13 * arg14: 'T14 * arg15: 'T15 * arg16: 'T16 * callback: AsyncCallback * object: obj -> IAsyncResult
member EndInvoke: result: IAsyncResult -> 'TResult
member Invoke: arg1: 'T1 * arg2: 'T2 * arg3: 'T3 * arg4: 'T4 * arg5: 'T5 * arg6: 'T6 * arg7: 'T7 * arg8: 'T8 * arg9: 'T9 * arg10: 'T10 * arg11: 'T11 * arg12: 'T12 * arg13: 'T13 * arg14: 'T14 * arg15: 'T15 * arg16: 'T16 -> 'TResult
<summary>Encapsulates a method that has 16 parameters and returns a value of the type specified by the <typeparamref name="TResult" /> parameter.</summary>
<param name="arg1">The first parameter of the method that this delegate encapsulates.</param>
<param name="arg2">The second parameter of the method that this delegate encapsulates.</param>
<param name="arg3">The third parameter of the method that this delegate encapsulates.</param>
<param name="arg4">The fourth parameter of the method that this delegate encapsulates.</param>
<param name="arg5">The fifth parameter of the method that this delegate encapsulates.</param>
<param name="arg6">The sixth parameter of the method that this delegate encapsulates.</param>
<param name="arg7">The seventh parameter of the method that this delegate encapsulates.</param>
<param name="arg8">The eighth parameter of the method that this delegate encapsulates.</param>
<param name="arg9">The ninth parameter of the method that this delegate encapsulates.</param>
<param name="arg10">The tenth parameter of the method that this delegate encapsulates.</param>
<param name="arg11">The eleventh parameter of the method that this delegate encapsulates.</param>
<param name="arg12">The twelfth parameter of the method that this delegate encapsulates.</param>
<param name="arg13">The thirteenth parameter of the method that this delegate encapsulates.</param>
<param name="arg14">The fourteenth parameter of the method that this delegate encapsulates.</param>
<param name="arg15">The fifteenth parameter of the method that this delegate encapsulates.</param>
<param name="arg16">The sixteenth parameter of the method that this delegate encapsulates.</param>
<typeparam name="T1">The type of the first parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T2">The type of the second parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T3">The type of the third parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T4">The type of the fourth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T5">The type of the fifth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T6">The type of the sixth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T7">The type of the seventh parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T8">The type of the eighth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T9">The type of the ninth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T10">The type of the tenth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T11">The type of the eleventh parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T12">The type of the twelfth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T13">The type of the thirteenth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T14">The type of the fourteenth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T15">The type of the fifteenth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T16">The type of the sixteenth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="TResult">The type of the return value of the method that this delegate encapsulates.</typeparam>
<returns>The return value of the method that this delegate encapsulates.</returns>
--------------------
type Func<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10,'T11,'T12,'T13,'T14,'T15,'TResult (allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct)> =
new: object: obj * method: nativeint -> unit
member BeginInvoke: arg1: 'T1 * arg2: 'T2 * arg3: 'T3 * arg4: 'T4 * arg5: 'T5 * arg6: 'T6 * arg7: 'T7 * arg8: 'T8 * arg9: 'T9 * arg10: 'T10 * arg11: 'T11 * arg12: 'T12 * arg13: 'T13 * arg14: 'T14 * arg15: 'T15 * callback: AsyncCallback * object: obj -> IAsyncResult
member EndInvoke: result: IAsyncResult -> 'TResult
member Invoke: arg1: 'T1 * arg2: 'T2 * arg3: 'T3 * arg4: 'T4 * arg5: 'T5 * arg6: 'T6 * arg7: 'T7 * arg8: 'T8 * arg9: 'T9 * arg10: 'T10 * arg11: 'T11 * arg12: 'T12 * arg13: 'T13 * arg14: 'T14 * arg15: 'T15 -> 'TResult
<summary>Encapsulates a method that has 15 parameters and returns a value of the type specified by the <typeparamref name="TResult" /> parameter.</summary>
<param name="arg1">The first parameter of the method that this delegate encapsulates.</param>
<param name="arg2">The second parameter of the method that this delegate encapsulates.</param>
<param name="arg3">The third parameter of the method that this delegate encapsulates.</param>
<param name="arg4">The fourth parameter of the method that this delegate encapsulates.</param>
<param name="arg5">The fifth parameter of the method that this delegate encapsulates.</param>
<param name="arg6">The sixth parameter of the method that this delegate encapsulates.</param>
<param name="arg7">The seventh parameter of the method that this delegate encapsulates.</param>
<param name="arg8">The eighth parameter of the method that this delegate encapsulates.</param>
<param name="arg9">The ninth parameter of the method that this delegate encapsulates.</param>
<param name="arg10">The tenth parameter of the method that this delegate encapsulates.</param>
<param name="arg11">The eleventh parameter of the method that this delegate encapsulates.</param>
<param name="arg12">The twelfth parameter of the method that this delegate encapsulates.</param>
<param name="arg13">The thirteenth parameter of the method that this delegate encapsulates.</param>
<param name="arg14">The fourteenth parameter of the method that this delegate encapsulates.</param>
<param name="arg15">The fifteenth parameter of the method that this delegate encapsulates.</param>
<typeparam name="T1">The type of the first parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T2">The type of the second parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T3">The type of the third parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T4">The type of the fourth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T5">The type of the fifth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T6">The type of the sixth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T7">The type of the seventh parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T8">The type of the eighth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T9">The type of the ninth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T10">The type of the tenth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T11">The type of the eleventh parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T12">The type of the twelfth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T13">The type of the thirteenth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T14">The type of the fourteenth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T15">The type of the fifteenth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="TResult">The type of the return value of the method that this delegate encapsulates.</typeparam>
<returns>The return value of the method that this delegate encapsulates.</returns>
--------------------
type Func<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10,'T11,'T12,'T13,'T14,'TResult (allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct)> =
new: object: obj * method: nativeint -> unit
member BeginInvoke: arg1: 'T1 * arg2: 'T2 * arg3: 'T3 * arg4: 'T4 * arg5: 'T5 * arg6: 'T6 * arg7: 'T7 * arg8: 'T8 * arg9: 'T9 * arg10: 'T10 * arg11: 'T11 * arg12: 'T12 * arg13: 'T13 * arg14: 'T14 * callback: AsyncCallback * object: obj -> IAsyncResult
member EndInvoke: result: IAsyncResult -> 'TResult
member Invoke: arg1: 'T1 * arg2: 'T2 * arg3: 'T3 * arg4: 'T4 * arg5: 'T5 * arg6: 'T6 * arg7: 'T7 * arg8: 'T8 * arg9: 'T9 * arg10: 'T10 * arg11: 'T11 * arg12: 'T12 * arg13: 'T13 * arg14: 'T14 -> 'TResult
<summary>Encapsulates a method that has 14 parameters and returns a value of the type specified by the <typeparamref name="TResult" /> parameter.</summary>
<param name="arg1">The first parameter of the method that this delegate encapsulates.</param>
<param name="arg2">The second parameter of the method that this delegate encapsulates.</param>
<param name="arg3">The third parameter of the method that this delegate encapsulates.</param>
<param name="arg4">The fourth parameter of the method that this delegate encapsulates.</param>
<param name="arg5">The fifth parameter of the method that this delegate encapsulates.</param>
<param name="arg6">The sixth parameter of the method that this delegate encapsulates.</param>
<param name="arg7">The seventh parameter of the method that this delegate encapsulates.</param>
<param name="arg8">The eighth parameter of the method that this delegate encapsulates.</param>
<param name="arg9">The ninth parameter of the method that this delegate encapsulates.</param>
<param name="arg10">The tenth parameter of the method that this delegate encapsulates.</param>
<param name="arg11">The eleventh parameter of the method that this delegate encapsulates.</param>
<param name="arg12">The twelfth parameter of the method that this delegate encapsulates.</param>
<param name="arg13">The thirteenth parameter of the method that this delegate encapsulates.</param>
<param name="arg14">The fourteenth parameter of the method that this delegate encapsulates.</param>
<typeparam name="T1">The type of the first parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T2">The type of the second parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T3">The type of the third parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T4">The type of the fourth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T5">The type of the fifth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T6">The type of the sixth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T7">The type of the seventh parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T8">The type of the eighth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T9">The type of the ninth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T10">The type of the tenth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T11">The type of the eleventh parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T12">The type of the twelfth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T13">The type of the thirteenth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T14">The type of the fourteenth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="TResult">The type of the return value of the method that this delegate encapsulates.</typeparam>
<returns>The return value of the method that this delegate encapsulates.</returns>
--------------------
type Func<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10,'T11,'T12,'T13,'TResult (allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct)> =
new: object: obj * method: nativeint -> unit
member BeginInvoke: arg1: 'T1 * arg2: 'T2 * arg3: 'T3 * arg4: 'T4 * arg5: 'T5 * arg6: 'T6 * arg7: 'T7 * arg8: 'T8 * arg9: 'T9 * arg10: 'T10 * arg11: 'T11 * arg12: 'T12 * arg13: 'T13 * callback: AsyncCallback * object: obj -> IAsyncResult
member EndInvoke: result: IAsyncResult -> 'TResult
member Invoke: arg1: 'T1 * arg2: 'T2 * arg3: 'T3 * arg4: 'T4 * arg5: 'T5 * arg6: 'T6 * arg7: 'T7 * arg8: 'T8 * arg9: 'T9 * arg10: 'T10 * arg11: 'T11 * arg12: 'T12 * arg13: 'T13 -> 'TResult
<summary>Encapsulates a method that has 13 parameters and returns a value of the type specified by the <typeparamref name="TResult" /> parameter.</summary>
<param name="arg1">The first parameter of the method that this delegate encapsulates.</param>
<param name="arg2">The second parameter of the method that this delegate encapsulates.</param>
<param name="arg3">The third parameter of the method that this delegate encapsulates.</param>
<param name="arg4">The fourth parameter of the method that this delegate encapsulates.</param>
<param name="arg5">The fifth parameter of the method that this delegate encapsulates.</param>
<param name="arg6">The sixth parameter of the method that this delegate encapsulates.</param>
<param name="arg7">The seventh parameter of the method that this delegate encapsulates.</param>
<param name="arg8">The eighth parameter of the method that this delegate encapsulates.</param>
<param name="arg9">The ninth parameter of the method that this delegate encapsulates.</param>
<param name="arg10">The tenth parameter of the method that this delegate encapsulates.</param>
<param name="arg11">The eleventh parameter of the method that this delegate encapsulates.</param>
<param name="arg12">The twelfth parameter of the method that this delegate encapsulates.</param>
<param name="arg13">The thirteenth parameter of the method that this delegate encapsulates.</param>
<typeparam name="T1">The type of the first parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T2">The type of the second parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T3">The type of the third parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T4">The type of the fourth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T5">The type of the fifth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T6">The type of the sixth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T7">The type of the seventh parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T8">The type of the eighth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T9">The type of the ninth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T10">The type of the tenth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T11">The type of the eleventh parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T12">The type of the twelfth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T13">The type of the thirteenth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="TResult">The type of the return value of the method that this delegate encapsulates.</typeparam>
<returns>The return value of the method that this delegate encapsulates.</returns>
--------------------
type Func<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10,'T11,'T12,'TResult (allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct)> =
new: object: obj * method: nativeint -> unit
member BeginInvoke: arg1: 'T1 * arg2: 'T2 * arg3: 'T3 * arg4: 'T4 * arg5: 'T5 * arg6: 'T6 * arg7: 'T7 * arg8: 'T8 * arg9: 'T9 * arg10: 'T10 * arg11: 'T11 * arg12: 'T12 * callback: AsyncCallback * object: obj -> IAsyncResult
member EndInvoke: result: IAsyncResult -> 'TResult
member Invoke: arg1: 'T1 * arg2: 'T2 * arg3: 'T3 * arg4: 'T4 * arg5: 'T5 * arg6: 'T6 * arg7: 'T7 * arg8: 'T8 * arg9: 'T9 * arg10: 'T10 * arg11: 'T11 * arg12: 'T12 -> 'TResult
<summary>Encapsulates a method that has 12 parameters and returns a value of the type specified by the <typeparamref name="TResult" /> parameter.</summary>
<param name="arg1">The first parameter of the method that this delegate encapsulates.</param>
<param name="arg2">The second parameter of the method that this delegate encapsulates.</param>
<param name="arg3">The third parameter of the method that this delegate encapsulates.</param>
<param name="arg4">The fourth parameter of the method that this delegate encapsulates.</param>
<param name="arg5">The fifth parameter of the method that this delegate encapsulates.</param>
<param name="arg6">The sixth parameter of the method that this delegate encapsulates.</param>
<param name="arg7">The seventh parameter of the method that this delegate encapsulates.</param>
<param name="arg8">The eighth parameter of the method that this delegate encapsulates.</param>
<param name="arg9">The ninth parameter of the method that this delegate encapsulates.</param>
<param name="arg10">The tenth parameter of the method that this delegate encapsulates.</param>
<param name="arg11">The eleventh parameter of the method that this delegate encapsulates.</param>
<param name="arg12">The twelfth parameter of the method that this delegate encapsulates.</param>
<typeparam name="T1">The type of the first parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T2">The type of the second parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T3">The type of the third parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T4">The type of the fourth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T5">The type of the fifth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T6">The type of the sixth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T7">The type of the seventh parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T8">The type of the eighth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T9">The type of the ninth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T10">The type of the tenth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T11">The type of the eleventh parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T12">The type of the twelfth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="TResult">The type of the return value of the method that this delegate encapsulates.</typeparam>
<returns>The return value of the method that this delegate encapsulates.</returns>
--------------------
type Func<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10,'T11,'TResult (allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct)> =
new: object: obj * method: nativeint -> unit
member BeginInvoke: arg1: 'T1 * arg2: 'T2 * arg3: 'T3 * arg4: 'T4 * arg5: 'T5 * arg6: 'T6 * arg7: 'T7 * arg8: 'T8 * arg9: 'T9 * arg10: 'T10 * arg11: 'T11 * callback: AsyncCallback * object: obj -> IAsyncResult
member EndInvoke: result: IAsyncResult -> 'TResult
member Invoke: arg1: 'T1 * arg2: 'T2 * arg3: 'T3 * arg4: 'T4 * arg5: 'T5 * arg6: 'T6 * arg7: 'T7 * arg8: 'T8 * arg9: 'T9 * arg10: 'T10 * arg11: 'T11 -> 'TResult
<summary>Encapsulates a method that has 11 parameters and returns a value of the type specified by the <typeparamref name="TResult" /> parameter.</summary>
<param name="arg1">The first parameter of the method that this delegate encapsulates.</param>
<param name="arg2">The second parameter of the method that this delegate encapsulates.</param>
<param name="arg3">The third parameter of the method that this delegate encapsulates.</param>
<param name="arg4">The fourth parameter of the method that this delegate encapsulates.</param>
<param name="arg5">The fifth parameter of the method that this delegate encapsulates.</param>
<param name="arg6">The sixth parameter of the method that this delegate encapsulates.</param>
<param name="arg7">The seventh parameter of the method that this delegate encapsulates.</param>
<param name="arg8">The eighth parameter of the method that this delegate encapsulates.</param>
<param name="arg9">The ninth parameter of the method that this delegate encapsulates.</param>
<param name="arg10">The tenth parameter of the method that this delegate encapsulates.</param>
<param name="arg11">The eleventh parameter of the method that this delegate encapsulates.</param>
<typeparam name="T1">The type of the first parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T2">The type of the second parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T3">The type of the third parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T4">The type of the fourth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T5">The type of the fifth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T6">The type of the sixth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T7">The type of the seventh parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T8">The type of the eighth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T9">The type of the ninth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T10">The type of the tenth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T11">The type of the eleventh parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="TResult">The type of the return value of the method that this delegate encapsulates.</typeparam>
<returns>The return value of the method that this delegate encapsulates.</returns>
--------------------
type Func<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'T10,'TResult (allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct)> =
new: object: obj * method: nativeint -> unit
member BeginInvoke: arg1: 'T1 * arg2: 'T2 * arg3: 'T3 * arg4: 'T4 * arg5: 'T5 * arg6: 'T6 * arg7: 'T7 * arg8: 'T8 * arg9: 'T9 * arg10: 'T10 * callback: AsyncCallback * object: obj -> IAsyncResult
member EndInvoke: result: IAsyncResult -> 'TResult
member Invoke: arg1: 'T1 * arg2: 'T2 * arg3: 'T3 * arg4: 'T4 * arg5: 'T5 * arg6: 'T6 * arg7: 'T7 * arg8: 'T8 * arg9: 'T9 * arg10: 'T10 -> 'TResult
<summary>Encapsulates a method that has 10 parameters and returns a value of the type specified by the <typeparamref name="TResult" /> parameter.</summary>
<param name="arg1">The first parameter of the method that this delegate encapsulates.</param>
<param name="arg2">The second parameter of the method that this delegate encapsulates.</param>
<param name="arg3">The third parameter of the method that this delegate encapsulates.</param>
<param name="arg4">The fourth parameter of the method that this delegate encapsulates.</param>
<param name="arg5">The fifth parameter of the method that this delegate encapsulates.</param>
<param name="arg6">The sixth parameter of the method that this delegate encapsulates.</param>
<param name="arg7">The seventh parameter of the method that this delegate encapsulates.</param>
<param name="arg8">The eighth parameter of the method that this delegate encapsulates.</param>
<param name="arg9">The ninth parameter of the method that this delegate encapsulates.</param>
<param name="arg10">The tenth parameter of the method that this delegate encapsulates.</param>
<typeparam name="T1">The type of the first parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T2">The type of the second parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T3">The type of the third parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T4">The type of the fourth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T5">The type of the fifth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T6">The type of the sixth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T7">The type of the seventh parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T8">The type of the eighth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T9">The type of the ninth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T10">The type of the tenth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="TResult">The type of the return value of the method that this delegate encapsulates.</typeparam>
<returns>The return value of the method that this delegate encapsulates.</returns>
--------------------
type Func<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'T9,'TResult (allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct)> =
new: object: obj * method: nativeint -> unit
member BeginInvoke: arg1: 'T1 * arg2: 'T2 * arg3: 'T3 * arg4: 'T4 * arg5: 'T5 * arg6: 'T6 * arg7: 'T7 * arg8: 'T8 * arg9: 'T9 * callback: AsyncCallback * object: obj -> IAsyncResult
member EndInvoke: result: IAsyncResult -> 'TResult
member Invoke: arg1: 'T1 * arg2: 'T2 * arg3: 'T3 * arg4: 'T4 * arg5: 'T5 * arg6: 'T6 * arg7: 'T7 * arg8: 'T8 * arg9: 'T9 -> 'TResult
<summary>Encapsulates a method that has nine parameters and returns a value of the type specified by the <typeparamref name="TResult" /> parameter.</summary>
<param name="arg1">The first parameter of the method that this delegate encapsulates.</param>
<param name="arg2">The second parameter of the method that this delegate encapsulates.</param>
<param name="arg3">The third parameter of the method that this delegate encapsulates.</param>
<param name="arg4">The fourth parameter of the method that this delegate encapsulates.</param>
<param name="arg5">The fifth parameter of the method that this delegate encapsulates.</param>
<param name="arg6">The sixth parameter of the method that this delegate encapsulates.</param>
<param name="arg7">The seventh parameter of the method that this delegate encapsulates.</param>
<param name="arg8">The eighth parameter of the method that this delegate encapsulates.</param>
<param name="arg9">The ninth parameter of the method that this delegate encapsulates.</param>
<typeparam name="T1">The type of the first parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T2">The type of the second parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T3">The type of the third parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T4">The type of the fourth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T5">The type of the fifth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T6">The type of the sixth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T7">The type of the seventh parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T8">The type of the eighth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T9">The type of the ninth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="TResult">The type of the return value of the method that this delegate encapsulates.</typeparam>
<returns>The return value of the method that this delegate encapsulates.</returns>
--------------------
type Func<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'T8,'TResult (allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct)> =
new: object: obj * method: nativeint -> unit
member BeginInvoke: arg1: 'T1 * arg2: 'T2 * arg3: 'T3 * arg4: 'T4 * arg5: 'T5 * arg6: 'T6 * arg7: 'T7 * arg8: 'T8 * callback: AsyncCallback * object: obj -> IAsyncResult
member EndInvoke: result: IAsyncResult -> 'TResult
member Invoke: arg1: 'T1 * arg2: 'T2 * arg3: 'T3 * arg4: 'T4 * arg5: 'T5 * arg6: 'T6 * arg7: 'T7 * arg8: 'T8 -> 'TResult
<summary>Encapsulates a method that has eight parameters and returns a value of the type specified by the <typeparamref name="TResult" /> parameter.</summary>
<param name="arg1">The first parameter of the method that this delegate encapsulates.</param>
<param name="arg2">The second parameter of the method that this delegate encapsulates.</param>
<param name="arg3">The third parameter of the method that this delegate encapsulates.</param>
<param name="arg4">The fourth parameter of the method that this delegate encapsulates.</param>
<param name="arg5">The fifth parameter of the method that this delegate encapsulates.</param>
<param name="arg6">The sixth parameter of the method that this delegate encapsulates.</param>
<param name="arg7">The seventh parameter of the method that this delegate encapsulates.</param>
<param name="arg8">The eighth parameter of the method that this delegate encapsulates.</param>
<typeparam name="T1">The type of the first parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T2">The type of the second parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T3">The type of the third parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T4">The type of the fourth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T5">The type of the fifth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T6">The type of the sixth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T7">The type of the seventh parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T8">The type of the eighth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="TResult">The type of the return value of the method that this delegate encapsulates.</typeparam>
<returns>The return value of the method that this delegate encapsulates.</returns>
--------------------
type Func<'T1,'T2,'T3,'T4,'T5,'T6,'T7,'TResult (allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct)> =
new: object: obj * method: nativeint -> unit
member BeginInvoke: arg1: 'T1 * arg2: 'T2 * arg3: 'T3 * arg4: 'T4 * arg5: 'T5 * arg6: 'T6 * arg7: 'T7 * callback: AsyncCallback * object: obj -> IAsyncResult
member EndInvoke: result: IAsyncResult -> 'TResult
member Invoke: arg1: 'T1 * arg2: 'T2 * arg3: 'T3 * arg4: 'T4 * arg5: 'T5 * arg6: 'T6 * arg7: 'T7 -> 'TResult
<summary>Encapsulates a method that has seven parameters and returns a value of the type specified by the <typeparamref name="TResult" /> parameter.</summary>
<param name="arg1">The first parameter of the method that this delegate encapsulates.</param>
<param name="arg2">The second parameter of the method that this delegate encapsulates.</param>
<param name="arg3">The third parameter of the method that this delegate encapsulates.</param>
<param name="arg4">The fourth parameter of the method that this delegate encapsulates.</param>
<param name="arg5">The fifth parameter of the method that this delegate encapsulates.</param>
<param name="arg6">The sixth parameter of the method that this delegate encapsulates.</param>
<param name="arg7">The seventh parameter of the method that this delegate encapsulates.</param>
<typeparam name="T1">The type of the first parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T2">The type of the second parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T3">The type of the third parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T4">The type of the fourth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T5">The type of the fifth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T6">The type of the sixth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T7">The type of the seventh parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="TResult">The type of the return value of the method that this delegate encapsulates.</typeparam>
<returns>The return value of the method that this delegate encapsulates.</returns>
--------------------
type Func<'T1,'T2,'T3,'T4,'T5,'T6,'TResult (allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct)> =
new: object: obj * method: nativeint -> unit
member BeginInvoke: arg1: 'T1 * arg2: 'T2 * arg3: 'T3 * arg4: 'T4 * arg5: 'T5 * arg6: 'T6 * callback: AsyncCallback * object: obj -> IAsyncResult
member EndInvoke: result: IAsyncResult -> 'TResult
member Invoke: arg1: 'T1 * arg2: 'T2 * arg3: 'T3 * arg4: 'T4 * arg5: 'T5 * arg6: 'T6 -> 'TResult
<summary>Encapsulates a method that has six parameters and returns a value of the type specified by the <typeparamref name="TResult" /> parameter.</summary>
<param name="arg1">The first parameter of the method that this delegate encapsulates.</param>
<param name="arg2">The second parameter of the method that this delegate encapsulates.</param>
<param name="arg3">The third parameter of the method that this delegate encapsulates.</param>
<param name="arg4">The fourth parameter of the method that this delegate encapsulates.</param>
<param name="arg5">The fifth parameter of the method that this delegate encapsulates.</param>
<param name="arg6">The sixth parameter of the method that this delegate encapsulates.</param>
<typeparam name="T1">The type of the first parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T2">The type of the second parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T3">The type of the third parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T4">The type of the fourth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T5">The type of the fifth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T6">The type of the sixth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="TResult">The type of the return value of the method that this delegate encapsulates.</typeparam>
<returns>The return value of the method that this delegate encapsulates.</returns>
--------------------
type Func<'T1,'T2,'T3,'T4,'T5,'TResult (allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct)> =
new: object: obj * method: nativeint -> unit
member BeginInvoke: arg1: 'T1 * arg2: 'T2 * arg3: 'T3 * arg4: 'T4 * arg5: 'T5 * callback: AsyncCallback * object: obj -> IAsyncResult
member EndInvoke: result: IAsyncResult -> 'TResult
member Invoke: arg1: 'T1 * arg2: 'T2 * arg3: 'T3 * arg4: 'T4 * arg5: 'T5 -> 'TResult
<summary>Encapsulates a method that has five parameters and returns a value of the type specified by the <typeparamref name="TResult" /> parameter.</summary>
<param name="arg1">The first parameter of the method that this delegate encapsulates.</param>
<param name="arg2">The second parameter of the method that this delegate encapsulates.</param>
<param name="arg3">The third parameter of the method that this delegate encapsulates.</param>
<param name="arg4">The fourth parameter of the method that this delegate encapsulates.</param>
<param name="arg5">The fifth parameter of the method that this delegate encapsulates.</param>
<typeparam name="T1">The type of the first parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T2">The type of the second parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T3">The type of the third parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T4">The type of the fourth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T5">The type of the fifth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="TResult">The type of the return value of the method that this delegate encapsulates.</typeparam>
<returns>The return value of the method that this delegate encapsulates.</returns>
--------------------
type Func<'T1,'T2,'T3,'T4,'TResult (allows ref struct and allows ref struct and allows ref struct and allows ref struct and allows ref struct)> =
new: object: obj * method: nativeint -> unit
member BeginInvoke: arg1: 'T1 * arg2: 'T2 * arg3: 'T3 * arg4: 'T4 * callback: AsyncCallback * object: obj -> IAsyncResult
member EndInvoke: result: IAsyncResult -> 'TResult
member Invoke: arg1: 'T1 * arg2: 'T2 * arg3: 'T3 * arg4: 'T4 -> 'TResult
<summary>Encapsulates a method that has four parameters and returns a value of the type specified by the <typeparamref name="TResult" /> parameter.</summary>
<param name="arg1">The first parameter of the method that this delegate encapsulates.</param>
<param name="arg2">The second parameter of the method that this delegate encapsulates.</param>
<param name="arg3">The third parameter of the method that this delegate encapsulates.</param>
<param name="arg4">The fourth parameter of the method that this delegate encapsulates.</param>
<typeparam name="T1">The type of the first parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T2">The type of the second parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T3">The type of the third parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T4">The type of the fourth parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="TResult">The type of the return value of the method that this delegate encapsulates.</typeparam>
<returns>The return value of the method that this delegate encapsulates.</returns>
--------------------
type Func<'T1,'T2,'T3,'TResult (allows ref struct and allows ref struct and allows ref struct and allows ref struct)> =
new: object: obj * method: nativeint -> unit
member BeginInvoke: arg1: 'T1 * arg2: 'T2 * arg3: 'T3 * callback: AsyncCallback * object: obj -> IAsyncResult
member EndInvoke: result: IAsyncResult -> 'TResult
member Invoke: arg1: 'T1 * arg2: 'T2 * arg3: 'T3 -> 'TResult
<summary>Encapsulates a method that has three parameters and returns a value of the type specified by the <typeparamref name="TResult" /> parameter.</summary>
<param name="arg1">The first parameter of the method that this delegate encapsulates.</param>
<param name="arg2">The second parameter of the method that this delegate encapsulates.</param>
<param name="arg3">The third parameter of the method that this delegate encapsulates.</param>
<typeparam name="T1">The type of the first parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T2">The type of the second parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T3">The type of the third parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="TResult">The type of the return value of the method that this delegate encapsulates.</typeparam>
<returns>The return value of the method that this delegate encapsulates.</returns>
--------------------
type Func<'T1,'T2,'TResult (allows ref struct and allows ref struct and allows ref struct)> =
new: object: obj * method: nativeint -> unit
member BeginInvoke: arg1: 'T1 * arg2: 'T2 * callback: AsyncCallback * object: obj -> IAsyncResult
member EndInvoke: result: IAsyncResult -> 'TResult
member Invoke: arg1: 'T1 * arg2: 'T2 -> 'TResult
<summary>Encapsulates a method that has two parameters and returns a value of the type specified by the <typeparamref name="TResult" /> parameter.</summary>
<param name="arg1">The first parameter of the method that this delegate encapsulates.</param>
<param name="arg2">The second parameter of the method that this delegate encapsulates.</param>
<typeparam name="T1">The type of the first parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="T2">The type of the second parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="TResult">The type of the return value of the method that this delegate encapsulates.</typeparam>
<returns>The return value of the method that this delegate encapsulates.</returns>
--------------------
type Func<'T,'TResult (allows ref struct and allows ref struct)> =
new: object: obj * method: nativeint -> unit
member BeginInvoke: arg: 'T * callback: AsyncCallback * object: obj -> IAsyncResult
member EndInvoke: result: IAsyncResult -> 'TResult
member Invoke: arg: 'T -> 'TResult
<summary>Encapsulates a method that has one parameter and returns a value of the type specified by the <typeparamref name="TResult" /> parameter.</summary>
<param name="arg">The parameter of the method that this delegate encapsulates.</param>
<typeparam name="T">The type of the parameter of the method that this delegate encapsulates.</typeparam>
<typeparam name="TResult">The type of the return value of the method that this delegate encapsulates.</typeparam>
<returns>The return value of the method that this delegate encapsulates.</returns>
--------------------
type Func<'TResult (allows ref struct)> =
new: object: obj * method: nativeint -> unit
member BeginInvoke: callback: AsyncCallback * object: obj -> IAsyncResult
member EndInvoke: result: IAsyncResult -> 'TResult
member Invoke: unit -> 'TResult
<summary>Encapsulates a method that has no parameters and returns a value of the type specified by the <typeparamref name="TResult" /> parameter.</summary>
<typeparam name="TResult">The type of the return value of the method that this delegate encapsulates.</typeparam>
<returns>The return value of the method that this delegate encapsulates.</returns>
System.Func.Invoke() : 'a
val il: ILBuilder
val fortyTwoFn: (unit -> int)
custom operation: ldc_i4 (int)
Calls ILBuilder.Ldc_i4
custom operation: ldc_i4_0
Calls ILBuilder.Ldc_i4_0
custom operation: add
Calls ILBuilder.Add
custom operation: mul
Calls ILBuilder.Mul
custom operation: ret
Calls ILBuilder.Ret
val fortyTwo: int
val refCheck: what: string -> ok: bool -> unit
val what: string
val ok: bool
val failwith: message: string -> 'T
Multiple items
type OptionBuilder' =
new: unit -> OptionBuilder'
member Bind: o: 'c option * f: ('c -> 'd option) -> 'd option
member Return: x: 'b -> 'b option
member ReturnFrom: o: 'a option -> 'a option
member Zero: unit -> 'a option
--------------------
new: unit -> OptionBuilder'
val o: 'c option
val f: ('c -> 'd option)
val o: 'a option
val option': OptionBuilder'
Multiple items
type CPSBuilder' =
new: unit -> CPSBuilder'
member Bind: c: (('e -> 'f) -> 'g) * f: ('e -> 'h -> 'f) -> ('h -> 'g)
member Delay: f: (unit -> 'a -> 'b) -> ('a -> 'b)
member Return: x: 'c -> (('c -> 'd) -> 'd)
--------------------
new: unit -> CPSBuilder'
val c: (('e -> 'f) -> 'g)
val f: ('e -> 'h -> 'f)
val k: 'h
val x: 'e
val k: ('c -> 'd)
val f: (unit -> 'a -> 'b)
val k: 'a
val cps': CPSBuilder'
val sizeC': t: 'a BinTree -> ((int -> 'b) -> 'b)
Multiple items
type MySeqBuilder' =
new: unit -> MySeqBuilder'
member Combine: xs: 'a seq * ys: 'a seq -> 'a seq
member Delay: f: (unit -> 'a seq) -> 'a seq
member For: xs: 'a seq * f: ('a -> 'b seq) -> 'b seq
member Yield: x: 'b -> 'b seq
member Zero: unit -> 'a seq
--------------------
new: unit -> MySeqBuilder'
val ys: 'a seq
val append: source1: 'T seq -> source2: 'T seq -> 'T seq
val f: (unit -> 'a seq)
val empty<'T> : 'T seq
val myseq': MySeqBuilder'