Default Module
Exposes type-inference-friendly collection builders.
Example
The type of xs
is inferred to be seq<int>
.
let f xs =
resizeArray {
for x in xs -> x * x
}
Functions and values
Function or value |
Description
|
|
Builds a collection of the inferred or specified type using computation expression syntax.
Example
val xs: int array
val ys: obj
type ResizeArray<'T> = System.Collections.Generic.List<'T>
Multiple items
val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = int val zs: obj
val xs: int array
val ys: ResizeArray<int>
type ResizeArray<'T> = System.Collections.Generic.List<'T>
Multiple items
val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = int val zs: obj
|
|
Builds a dictionary of the inferred or specified type using computation expression syntax.
Example
val m: obj
Multiple items
val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = int
val m: obj
Multiple items
val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = int |
|
Builds a Dictionary using computation expression syntax.
Example
val m: obj
|
|
Builds a HashSet using computation expression syntax.
Example
val xs: obj
|
|
Builds an ImmutableArray using computation expression syntax.
Example
val xs: obj
|
|
Builds an ImmutableDictionary using computation expression syntax.
Example
val m: obj
|
|
Builds an ImmutableHashSet using computation expression syntax.
Example
val xs: obj
|
|
Builds an ImmutableList using computation expression syntax.
Example
val xs: obj
|
|
Builds an ImmutableSortedDictionary using computation expression syntax.
Example
val m: obj
|
|
Builds an ImmutableSortedSet using computation expression syntax.
Example
val xs: obj
|
|
Builds a Map using computation expression syntax.
Example
val m: obj
|
|
Builds a List using computation expression syntax.
Example
val f: xs: 'a -> 'b
val xs: 'a
val a: int
val xs: int array
val ys: obj
|
|
Builds a Set using computation expression syntax.
Example
val xs: obj
|
|
Builds a SortedDictionary using computation expression syntax.
Example
val m: obj
|
|
Builds a SortedSet using computation expression syntax.
Example
val xs: obj
|
|
Computes a sum using computation expression syntax.
Example
val s: obj
val xs: int list
val s: obj
val xs: int list
val s: obj
|
|
Computes a sum using computation expression syntax.
Example
val s: obj
val xs: int list
val s: obj
val xs: int list
val s: obj
|
Type extensions
Type extension |
Description
|
Full Usage:
this.For
Parameters:
'a seq
body : 'a -> CollectionBuilderCode<'b>
Returns: CollectionBuilderCode<'b>
Modifiers: inline Type parameters: 'a, 'b |
Extended Type:
|
Full Usage:
this.YieldFrom
Parameters:
'a seq
Returns: CollectionBuilderCode<^b>
Modifiers: inline Type parameters: 'a, ^b, 'c |
|
Full Usage:
this.YieldFrom
Parameters:
('a * 'b) seq
Returns: CollectionBuilderCode<^c>
Modifiers: inline Type parameters: 'a, 'b, ^c, 'd |
|
Full Usage:
this.YieldFrom
Parameters:
KeyValuePair<'a, 'b> seq
Returns: CollectionBuilderCode<^c>
Modifiers: inline Type parameters: 'a, 'b, ^c, 'd |
|
Full Usage:
this.YieldFrom
Parameters:
'a seq
Returns: CollectionBuilderCode<Set<'a>>
Modifiers: inline Type parameters: 'a |
|
Full Usage:
this.YieldFrom
Parameters:
('a * 'b) seq
Returns: CollectionBuilderCode<Map<'a, 'b>>
Modifiers: inline Type parameters: 'a, 'b |
|
Full Usage:
this.YieldFrom
Parameters:
KeyValuePair<'a, 'b> seq
Returns: CollectionBuilderCode<Map<'a, 'b>>
Modifiers: inline Type parameters: 'a, 'b |