diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 000000000..e69de29bb diff --git a/content/fsdocs-custom.css b/content/fsdocs-custom.css new file mode 100644 index 000000000..c32465db8 --- /dev/null +++ b/content/fsdocs-custom.css @@ -0,0 +1,5 @@ + +/*-------------------------------------------------------------------------- + Customize your CSS here +/*--------------------------------------------------------------------------*/ + diff --git a/content/fsdocs-default.css b/content/fsdocs-default.css new file mode 100644 index 000000000..bf73bfa5a --- /dev/null +++ b/content/fsdocs-default.css @@ -0,0 +1,613 @@ +@import url('https://fonts.googleapis.com/css2?family=Hind+Vadodara&family=Roboto+Mono:wght@400;500;600&display=swap'); +/*-------------------------------------------------------------------------- + Formatting for page & standard document content +/*--------------------------------------------------------------------------*/ + +body { + font-family: 'Hind Vadodara', sans-serif; + /* padding-top: 0px; + padding-bottom: 40px; +*/ +} + +blockquote { + margin: 0 1em 0 0.25em; + margin-top: 0px; + margin-right: 1em; + margin-bottom: 0px; + margin-left: 0.25em; + padding: 0 .75em 0 1em; + border-left: 1px solid #777; + border-right: 0px solid #777; +} + +/* Format the heading - nicer spacing etc. */ +.masthead { + overflow: hidden; +} + + .masthead .muted a { + text-decoration: none; + color: #999999; + } + + .masthead ul, .masthead li { + margin-bottom: 0px; + } + + .masthead .nav li { + margin-top: 15px; + font-size: 110%; + } + + .masthead h3 { + margin-top: 15px; + margin-bottom: 5px; + font-size: 170%; + } + +/*-------------------------------------------------------------------------- + Formatting fsdocs-content +/*--------------------------------------------------------------------------*/ + +/* Change font sizes for headings etc. */ +#fsdocs-content h1 { + margin: 30px 0px 15px 0px; + /* font-weight: 400; */ + font-size: 2rem; + letter-spacing: 1.78px; + line-height: 2.5rem; + font-weight: 400; +} + +#fsdocs-content h2 { + font-size: 1.6rem; + margin: 20px 0px 10px 0px; + font-weight: 400; +} + +#fsdocs-content h3 { + font-size: 1.2rem; + margin: 15px 0px 10px 0px; + font-weight: 400; +} + +#fsdocs-content hr { + margin: 0px 0px 20px 0px; +} + +#fsdocs-content li { + font-size: 1.0rem; + line-height: 1.375rem; + letter-spacing: 0.01px; + font-weight: 500; + margin: 0px 0px 15px 0px; +} + +#fsdocs-content p { + font-size: 1.0rem; + line-height: 1.375rem; + letter-spacing: 0.01px; + font-weight: 500; + color: #262626; +} + +#fsdocs-content a { + color: #4974D1; +} +/* remove the default bootstrap bold on dt elements */ +#fsdocs-content dt { + font-weight: normal; +} + + + +/*-------------------------------------------------------------------------- + Formatting tables in fsdocs-content, using learn.microsoft.com tables +/*--------------------------------------------------------------------------*/ + +#fsdocs-content .table { + table-layout: auto; + width: 100%; + font-size: 0.875rem; +} + + #fsdocs-content .table caption { + font-size: 0.8rem; + font-weight: 600; + letter-spacing: 2px; + text-transform: uppercase; + padding: 1.125rem; + border-width: 0 0 1px; + border-style: solid; + border-color: #e3e3e3; + text-align: right; + } + + #fsdocs-content .table td, + #fsdocs-content .table th { + display: table-cell; + word-wrap: break-word; + padding: 0.75rem 1rem 0.75rem 0rem; + line-height: 1.5; + vertical-align: top; + border-top: 1px solid #e3e3e3; + border-right: 0; + border-left: 0; + border-bottom: 0; + border-style: solid; + } + + /* suppress the top line on inner lists such as tables of exceptions */ + #fsdocs-content .table .fsdocs-exception-list td, + #fsdocs-content .table .fsdocs-exception-list th { + border-top: 0 + } + + #fsdocs-content .table td p:first-child, + #fsdocs-content .table th p:first-child { + margin-top: 0; + } + + #fsdocs-content .table td.nowrap, + #fsdocs-content .table th.nowrap { + white-space: nowrap; + } + + #fsdocs-content .table td.is-narrow, + #fsdocs-content .table th.is-narrow { + width: 15%; + } + + #fsdocs-content .table th:not([scope='row']) { + border-top: 0; + border-bottom: 1px; + } + + #fsdocs-content .table > caption + thead > tr:first-child > td, + #fsdocs-content .table > colgroup + thead > tr:first-child > td, + #fsdocs-content .table > thead:first-child > tr:first-child > td { + border-top: 0; + } + + #fsdocs-content .table table-striped > tbody > tr:nth-of-type(odd) { + background-color: var(--box-shadow-light); + } + + #fsdocs-content .table.min { + width: unset; + } + + #fsdocs-content .table.is-left-aligned td:first-child, + #fsdocs-content .table.is-left-aligned th:first-child { + padding-left: 0; + } + + #fsdocs-content .table.is-left-aligned td:first-child a, + #fsdocs-content .table.is-left-aligned th:first-child a { + outline-offset: -0.125rem; + } + +@media screen and (max-width: 767px), screen and (min-resolution: 120dpi) and (max-width: 767.9px) { + #fsdocs-content .table.is-stacked-mobile td:nth-child(1) { + display: block; + width: 100%; + padding: 1rem 0; + } + + #fsdocs-content .table.is-stacked-mobile td:not(:nth-child(1)) { + display: block; + border-width: 0; + padding: 0 0 1rem; + } +} + +#fsdocs-content .table.has-inner-borders th, +#fsdocs-content .table.has-inner-borders td { + border-right: 1px solid #e3e3e3; +} + + #fsdocs-content .table.has-inner-borders th:last-child, + #fsdocs-content .table.has-inner-borders td:last-child { + border-right: none; + } + +.fsdocs-entity-list .fsdocs-entity-name { + width: 25%; + font-weight: bold; +} + +.fsdocs-member-list .fsdocs-member-usage { + width: 35%; +} + +/*-------------------------------------------------------------------------- + Formatting xmldoc sections in fsdocs-content +/*--------------------------------------------------------------------------*/ + +.fsdocs-summary { + display: inline; +} + +.fsdocs-xmldoc, .fsdocs-entity-xmldoc, .fsdocs-member-xmldoc { + font-size: 1.0rem; + line-height: 1.375rem; + letter-spacing: 0.01px; + font-weight: 500; + color: #262626; +} + +.fsdocs-xmldoc h1 { + font-size: 1.2rem; + margin: 10px 0px 0px 0px; +} + +.fsdocs-xmldoc h2 { + font-size: 1.2rem; + margin: 10px 0px 0px 0px; +} + +.fsdocs-xmldoc h3 { + font-size: 1.1rem; + margin: 10px 0px 0px 0px; +} + +.fsdocs-member-xmldoc details[open] summary + * { + margin-top: 1rem; +} + +/* #fsdocs-nav .searchbox { + margin-top: 30px; + margin-bottom: 30px; +} */ + +#fsdocs-nav img.logo{ + width:90%; + /* height:140px; */ + /* margin:10px 0px 0px 20px; */ + margin-top:40px; + border-style:none; +} + +#fsdocs-nav input{ + /* margin-left: 20px; */ + margin-right: 20px; + margin-top: 20px; + margin-bottom: 20px; + width: 93%; + -webkit-border-radius: 0; + border-radius: 0; +} + +#fsdocs-nav { + /* margin-left: -5px; */ + /* width: 90%; */ + font-size:0.95rem; +} + +#fsdocs-nav li.nav-header{ + /* margin-left: -5px; */ + /* width: 90%; */ + padding-left: 0; + color: #262626; + text-transform: none; + font-size:16px; + margin-top: 9px; + font-weight: bold; +} + +#fsdocs-nav a{ + padding-left: 0; + color: #6c6c6d; + /* margin-left: 5px; */ + /* width: 90%; */ +} + +/*-------------------------------------------------------------------------- + Formatting pre and code sections in fsdocs-content (code highlighting is + further below) +/*--------------------------------------------------------------------------*/ + +#fsdocs-content code { + /* font-size: 0.83rem; */ + font: 0.85rem 'Roboto Mono', monospace; + background-color: #f7f7f900; + border: 0px; + padding: 0px; + /* word-wrap: break-word; */ + /* white-space: pre; */ +} + +/* omitted */ +#fsdocs-content span.omitted { + background: #3c4e52; + border-radius: 5px; + color: #808080; + padding: 0px 0px 1px 0px; +} + +#fsdocs-content pre .fssnip code { + font: 0.86rem 'Roboto Mono', monospace; +} + +#fsdocs-content table.pre, +#fsdocs-content pre.fssnip, +#fsdocs-content pre { + line-height: 13pt; + border: 0px solid #d8d8d8; + border-top: 0px solid #e3e3e3; + border-collapse: separate; + white-space: pre; + font: 0.86rem 'Roboto Mono', monospace; + width: 100%; + margin: 10px 0px 20px 0px; + background-color: #f3f4f7; + padding: 10px; + border-radius: 5px; + color: #8e0e2b; + max-width: none; + box-sizing: border-box; +} + +#fsdocs-content pre.fssnip code { + font: 0.86rem 'Roboto Mono', monospace; + font-weight: 600; +} + +#fsdocs-content table.pre { + background-color: #fff7ed; +} + +#fsdocs-content table.pre pre { + padding: 0px; + margin: 0px; + border-radius: 0px; + width: 100%; + background-color: #fff7ed; + color: #837b79; +} + +#fsdocs-content table.pre td { + padding: 0px; + white-space: normal; + margin: 0px; + width: 100%; +} + +#fsdocs-content table.pre td.lines { + width: 30px; +} + + +#fsdocs-content pre { + word-wrap: inherit; +} + +.fsdocs-example-header { + font-size: 1.0rem; + line-height: 1.375rem; + letter-spacing: 0.01px; + font-weight: 700; + color: #262626; +} + +/*-------------------------------------------------------------------------- + Formatting github source links +/*--------------------------------------------------------------------------*/ + +.fsdocs-source-link { + float: right; + text-decoration: none; +} + + .fsdocs-source-link img { + border-style: none; + margin-left: 10px; + width: auto; + height: 1.4em; + } + + .fsdocs-source-link .hover { + display: none; + } + + .fsdocs-source-link:hover .hover { + display: block; + } + + .fsdocs-source-link .normal { + display: block; + } + + .fsdocs-source-link:hover .normal { + display: none; + } + +/*-------------------------------------------------------------------------- + Formatting logo +/*--------------------------------------------------------------------------*/ + +#fsdocs-logo { + width:140px; + height:140px; + margin:10px 0px 0px 0px; + border-style:none; +} + +/*-------------------------------------------------------------------------- + +/*--------------------------------------------------------------------------*/ + +#fsdocs-content table.pre pre { + padding: 0px; + margin: 0px; + border: none; +} + +/*-------------------------------------------------------------------------- + Remove formatting from links +/*--------------------------------------------------------------------------*/ + +#fsdocs-content h1 a, +#fsdocs-content h1 a:hover, +#fsdocs-content h1 a:focus, +#fsdocs-content h2 a, +#fsdocs-content h2 a:hover, +#fsdocs-content h2 a:focus, +#fsdocs-content h3 a, +#fsdocs-content h3 a:hover, +#fsdocs-content h3 a:focus, +#fsdocs-content h4 a, +#fsdocs-content h4 a:hover, #fsdocs-content +#fsdocs-content h4 a:focus, +#fsdocs-content h5 a, +#fsdocs-content h5 a:hover, +#fsdocs-content h5 a:focus, +#fsdocs-content h6 a, +#fsdocs-content h6 a:hover, +#fsdocs-content h6 a:focus { + color: #262626; + text-decoration: none; + text-decoration-style: none; + /* outline: none */ +} + +/*-------------------------------------------------------------------------- + Formatting for F# code snippets +/*--------------------------------------------------------------------------*/ + +.fsdocs-param-name, +.fsdocs-return-name, +.fsdocs-param { + font-weight: 900; + font-size: 0.85rem; + font-family: 'Roboto Mono', monospace; +} +/* strings --- and stlyes for other string related formats */ +#fsdocs-content span.s { + color: #dd1144; +} +/* printf formatters */ +#fsdocs-content span.pf { + color: #E0C57F; +} +/* escaped chars */ +#fsdocs-content span.e { + color: #EA8675; +} + +/* identifiers --- and styles for more specific identifier types */ +#fsdocs-content span.id { + color: #262626; +} +/* module */ +#fsdocs-content span.m { + color: #009999; +} +/* reference type */ +#fsdocs-content span.rt { + color: #4974D1; +} +/* value type */ +#fsdocs-content span.vt { + color: #43AEC6; +} +/* interface */ +#fsdocs-content span.if { + color: #43AEC6; +} +/* type argument */ +#fsdocs-content span.ta { + color: #43AEC6; +} +/* disposable */ +#fsdocs-content span.d { + color: #43AEC6; +} +/* property */ +#fsdocs-content span.prop { + color: #43AEC6; +} +/* punctuation */ +#fsdocs-content span.p { + color: #43AEC6; +} +#fsdocs-content span.pn { + color: #262626; +} +/* function */ +#fsdocs-content span.f { + color: #e1e1e1; +} +#fsdocs-content span.fn { + color: #990000; +} +/* active pattern */ +#fsdocs-content span.pat { + color: #4ec9b0; +} +/* union case */ +#fsdocs-content span.u { + color: #4ec9b0; +} +/* enumeration */ +#fsdocs-content span.e { + color: #4ec9b0; +} +/* keywords */ +#fsdocs-content span.k { + color: #b68015; + /* font-weight: bold; */ +} +/* comment */ +#fsdocs-content span.c { + color: #808080; + font-weight: 400; + font-style: italic; +} +/* operators */ +#fsdocs-content span.o { + color: #af75c1; +} +/* numbers */ +#fsdocs-content span.n { + color: #009999; +} +/* line number */ +#fsdocs-content span.l { + color: #80b0b0; +} +/* mutable var or ref cell */ +#fsdocs-content span.v { + color: #d1d1d1; + font-weight: bold; +} +/* inactive code */ +#fsdocs-content span.inactive { + color: #808080; +} +/* preprocessor */ +#fsdocs-content span.prep { + color: #af75c1; +} +/* fsi output */ +#fsdocs-content span.fsi { + color: #808080; +} + +/* tool tip */ +div.fsdocs-tip { + background: #475b5f; + border-radius: 4px; + font: 0.85rem 'Roboto Mono', monospace; + padding: 6px 8px 6px 8px; + display: none; + color: #d1d1d1; + pointer-events: none; +} + + div.fsdocs-tip code { + color: #d1d1d1; + font: 0.85rem 'Roboto Mono', monospace; + } + diff --git a/content/fsdocs-search.js b/content/fsdocs-search.js new file mode 100644 index 000000000..3d543cf38 --- /dev/null +++ b/content/fsdocs-search.js @@ -0,0 +1,84 @@ +var lunrIndex, pagesIndex; + +function endsWith(str, suffix) { + return str.indexOf(suffix, str.length - suffix.length) !== -1; +} + +// Initialize lunrjs using our generated index file +function initLunr() { + if (!endsWith(fsdocs_search_baseurl,"/")){ + fsdocs_search_baseurl = fsdocs_search_baseurl+'/' + }; + + // First retrieve the index file + $.getJSON(fsdocs_search_baseurl +"index.json") + .done(function(index) { + pagesIndex = index; + // Set up lunrjs by declaring the fields we use + // Also provide their boost level for the ranking + lunrIndex = lunr(function() { + this.ref("uri"); + this.field('title', { + boost: 15 + }); + this.field('tags', { + boost: 10 + }); + this.field("content", { + boost: 5 + }); + + this.pipeline.remove(lunr.stemmer); + this.searchPipeline.remove(lunr.stemmer); + + // Feed lunr with each file and let lunr actually index them + pagesIndex.forEach(function(page) { + this.add(page); + }, this); + }) + }) + .fail(function(jqxhr, textStatus, error) { + var err = textStatus + ", " + error; + console.error("Error getting Hugo index file:", err); + }); +} + +/** + * Trigger a search in lunr and transform the result + * + * @param {String} query + * @return {Array} results + */ +function search(queryTerm) { + // Find the item in our index corresponding to the lunr one to have more info + return lunrIndex.search(queryTerm+"^100"+" "+queryTerm+"*^10"+" "+"*"+queryTerm+"^10"+" "+queryTerm+"~2^1").map(function(result) { + return pagesIndex.filter(function(page) { + return page.uri === result.ref; + })[0]; + }); +} + +// Let's get started +initLunr(); + +$( document ).ready(function() { + var searchList = new autoComplete({ + /* selector for the search box element */ + minChars: 1, + selector: $("#search-by").get(0), + /* source is the callback to perform the search */ + source: function(term, response) { + response(search(term)); + }, + /* renderItem displays individual search results */ + renderItem: function(item, search) { + search = search.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); + var re = new RegExp("(" + search.split(' ').join('|') + ")", "gi"); + return '
This site contains the documentation for the FSharp.Core library used in all F# code.
+FSharp.Core contains functionality for basic F# definitions, operations for collections such as lists, maps and sequences, +and library functionality for quotations, reflections, events, asynchronous programming and native interoperability.
+The following namespaces are available:
+FSharp.Core - Basic definitions of options, functions, operators, results and formatting.
FSharp.Collections - Operations for collections such as lists, arrays, sets, maps and sequences. See also F# Collection Types in the F# Language Guide.
FSharp.Control - Library functionality for asynchronous programming, events and agents. See also F# Asynchronous Programming in the F# Language Guide.
FSharp.Linq - Library functionality for F# query syntax and interoperability with .NET Expressions. See also F# Query Expressions in the F# Language Guide.
FSharp.Quotations - Library functionality for F# quotations. See also F# Code Quotations in the F# Language Guide.
FSharp.Reflection - Library functionality for accessing additional information about F# types and F# values at runtime, augmenting that available through System.Reflection. See also F# Reflection in the F# Wiki Book.
FSharp.NativeInterop - Basic functionality for native interopability. See also F# External Functions in the F# Language Guide.
FSharp.Core.CompilerServices - Library functionality for supporting type providers and code generated by the F# compiler. See also F# Type Providers in the F# Language Guide.
To contribute to this documentation site and its content, please see the notes in the corresponding GitHub repository.
+ + ++ Contains operations for working with 2-dimensional arrays. +
++
See also F# Language Guide - Arrays.
F# and CLI multi-dimensional arrays are typically zero-based.
+ However, CLI multi-dimensional arrays used in conjunction with external
+ libraries (e.g. libraries associated with Visual Basic) be
+ non-zero based, using a potentially different base for each dimension.
+ The operations in this module will accept such arrays, and
+ the basing on an input array will be propagated to a matching output
+ array on the Array2D.map
and Array2D.mapi
operations.
+ Non-zero-based arrays can also be created using Array2D.zeroCreateBased
,
+ Array2D.createBased
and Array2D.initBased
.
+ Function or value + | ++ Description + | +||
+
+
+
+
+
+
+
+ Full Usage:
+
+ Array2D.base1 array
+ + + Parameters: +
'T[,]
+ -
+ The input array.
+
+ + + + Returns: + int
+
+ The base-index of the first dimension of the array.
+ + |
+
+
+
+ + ++
+ Example +++ Create a 10x10 1-based array: +
+namespace System
+Multiple items
+val array: int array2d -------------------- type 'T array = 'T array type Array =
+ interface ICollection
+ interface IEnumerable
+ interface IList
+ interface IStructuralComparable
+ interface IStructuralEquatable
+ interface ICloneable
+ member Clone: unit -> obj
+ member CopyTo: array: Array * index: int -> unit + 1 overload
+ member GetEnumerator: unit -> IEnumerator
+ member GetLength: dimension: int -> int
+ ...
+<summary>Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the base class for all arrays in the common language runtime.</summary> Array.CreateInstance(elementType: Type, [<ParamArray>] lengths: int64 array) : Array
+Array.CreateInstance(elementType: Type, [<ParamArray>] lengths: int array) : Array Array.CreateInstance(elementType: Type, length: int) : Array Array.CreateInstance(elementType: Type, lengths: int array, lowerBounds: int array) : Array Array.CreateInstance(elementType: Type, length1: int, length2: int) : Array Array.CreateInstance(elementType: Type, length1: int, length2: int, length3: int) : Array val typeof<'T> : Type
+Multiple items
+val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = + int module Array2D
+
+from Microsoft.FSharp.Collections
+val base1: array: 'T array2d -> int
+
+
+ Evaluates to 1 .
+
+
+ |
+ ||
+
+
+
+
+
+
+
+ Full Usage:
+
+ Array2D.base2 array
+ + + Parameters: +
'T[,]
+ -
+ The input array.
+
+ + + + Returns: + int
+
+ The base-index of the second dimension of the array.
+ + |
+
+
+
+ + ++
+ Example +++ Create a 10x10 1-based array: +
+namespace System
+Multiple items
+val array: int array2d -------------------- type 'T array = 'T array type Array =
+ interface ICollection
+ interface IEnumerable
+ interface IList
+ interface IStructuralComparable
+ interface IStructuralEquatable
+ interface ICloneable
+ member Clone: unit -> obj
+ member CopyTo: array: Array * index: int -> unit + 1 overload
+ member GetEnumerator: unit -> IEnumerator
+ member GetLength: dimension: int -> int
+ ...
+<summary>Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the base class for all arrays in the common language runtime.</summary> Array.CreateInstance(elementType: Type, [<ParamArray>] lengths: int64 array) : Array
+Array.CreateInstance(elementType: Type, [<ParamArray>] lengths: int array) : Array Array.CreateInstance(elementType: Type, length: int) : Array Array.CreateInstance(elementType: Type, lengths: int array, lowerBounds: int array) : Array Array.CreateInstance(elementType: Type, length1: int, length2: int) : Array Array.CreateInstance(elementType: Type, length1: int, length2: int, length3: int) : Array val typeof<'T> : Type
+Multiple items
+val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = + int module Array2D
+
+from Microsoft.FSharp.Collections
+val base2: array: 'T array2d -> int
+
+
+ Evaluates to 1 .
+
+
+ |
+ ||
+
+
+
+
+
+
+
+ Full Usage:
+
+ Array2D.blit source sourceIndex1 sourceIndex2 target targetIndex1 targetIndex2 length1 length2
+ + + Parameters: +
'T[,]
+ -
+ The source array.
+
+ + + + sourceIndex1 + + : + int
+ -
+ The first-dimension index to begin copying from in the source array.
+
+ + + + sourceIndex2 + + : + int
+ -
+ The second-dimension index to begin copying from in the source array.
+
+ + + + target + + : + 'T[,]
+ -
+ The target array.
+
+ + + + targetIndex1 + + : + int
+ -
+ The first-dimension index to begin copying into in the target array.
+
+ + + + targetIndex2 + + : + int
+ -
+ The second-dimension index to begin copying into in the target array.
+
+ + + + length1 + + : + int
+ -
+ The number of elements to copy across the first dimension of the arrays.
+
+ + + + length2 + + : + int
+ -
+ The number of elements to copy across the second dimension of the arrays.
+
+ + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Reads a range of elements from the first array and write them into the second. + + |
+
+ + ArgumentException + + | ++ Thrown when any of the indices are negative or if either of + the counts are larger than the dimensions of the array allow. + | +
+
let source = array2D [ [ 3; 4 ]; [ 13; 14 ] ]
+ let target = array2D [ [ 2; 2; 2 ]; [ 12; 12; 12 ] ]
+
+ Array2D.blit source 0 0 target 0 1 2 2
+
+target
contains [ [ 2; 3; 4 ]; [ 12; 13; 14 ] ]
.
+
+
+
+
+
+
+ Array2D.copy array
+
+
+
+
+ Array2D.copy array
+ 'T[,]
+ -
+ The input array.
+
+ 'T[,]
+
+ A copy of the input array.
+ + For non-zero-based arrays the basing on an input array will be propagated to the output + array. +
+'T[,]
+ + The input array. +
+'T[,]
+ + A copy of the input array. +
++
open System
+
+ let array = Array2D.zeroCreate<int> 10 10
+
+ array |> Array2D.copy
+
+
+
+
+ Array2D.create length1 length2 value
+ int
+ -
+ The length of the first dimension of the array.
+
+ int
+ -
+ The length of the second dimension of the array.
+
+ 'T
+ -
+ The value to populate the new array.
+
+ 'T[,]
+
+ The created array.
+ int
+ + The length of the first dimension of the array. +
+int
+ + The length of the second dimension of the array. +
+'T
+ + The value to populate the new array. +
+'T[,]
+ + The created array. +
++ + ArgumentException + + | ++ Thrown when length1 or length2 is negative. + | +
+
Array2D.create 2 3 1
+
+[[1; 1; 1]; [1; 1; 1]]
+
+
+
+
+
+ Array2D.createBased base1 base2 length1 length2 initial
+
+
+
+
+ Array2D.createBased base1 base2 length1 length2 initial
+ int
+ -
+ The base for the first dimension of the array.
+
+ int
+ -
+ The base for the second dimension of the array.
+
+ int
+ -
+ The length of the first dimension of the array.
+
+ int
+ -
+ The length of the second dimension of the array.
+
+ 'T
+ -
+ The value to populate the new array.
+
+ 'T[,]
+
+ The created array.
+ + Creates a based array whose elements are all initially the given value. +
+int
+ + The base for the first dimension of the array. +
+int
+ + The base for the second dimension of the array. +
+int
+ + The length of the first dimension of the array. +
+int
+ + The length of the second dimension of the array. +
+'T
+ + The value to populate the new array. +
+'T[,]
+ + The created array. +
++ + ArgumentException + + | ++ Thrown when base1, base2, length1, or length2 is negative. + | +
+
Array2D.createBased 1 1 2 3 1
+
+[[1; 1; 1]; [1; 1; 1]]
+
+
+
+
+ Array2D.get array index1 index2
+ 'T[,]
+ -
+ The input array.
+
+ int
+ -
+ The index along the first dimension.
+
+ int
+ -
+ The index along the second dimension.
+
+ 'T
+
+ The value of the array at the given index.
+
+ Fetches an element from a 2D array. You can also use the syntax array.[index1,index2]
.
+
+ + Indexer syntax is generally preferred, e.g. +
let array = array2D [ [ 1.0; 2.0 ]; [ 3.0; 4.0 ] ]
+
+ array[0,1]
+
+2.0
.
+
+
+ 'T[,]
+ + The input array. +
+int
+ + The index along the first dimension. +
+int
+ + The index along the second dimension. +
+'T
+ + The value of the array at the given index. +
++ + ArgumentException + + | ++ Thrown when the indices are negative or exceed the bounds of the array. + | +
+
let array = array2D [ [ 1.0; 2.0 ]; [ 3.0; 4.0 ] ]
+
+ Array2D.get array 0 1
+
+2.0
.
+
+
+
+
+
+ Array2D.init length1 length2 initializer
+ int
+ -
+ The length of the first dimension of the array.
+
+ int
+ -
+ The length of the second dimension of the array.
+
+ int -> int -> 'T
+ -
+ A function to produce elements of the array given the two indices.
+
+ 'T[,]
+
+ The generated array.
+ + Creates an array given the dimensions and a generator function to compute the elements. +
+int
+ + The length of the first dimension of the array. +
+int
+ + The length of the second dimension of the array. +
+int -> int -> 'T
+ + A function to produce elements of the array given the two indices. +
+'T[,]
+ + The generated array. +
++ + ArgumentException + + | ++ Thrown when either of the lengths is negative. + | +
+
Array2D.init 2 3 (fun i j -> i + j)
+
+[[0; 1; 2]; [1; 2; 3]]
+
+
+
+
+
+ Array2D.initBased base1 base2 length1 length2 initializer
+
+
+
+
+ Array2D.initBased base1 base2 length1 length2 initializer
+ int
+ -
+ The base for the first dimension of the array.
+
+ int
+ -
+ The base for the second dimension of the array.
+
+ int
+ -
+ The length of the first dimension of the array.
+
+ int
+ -
+ The length of the second dimension of the array.
+
+ int -> int -> 'T
+ -
+ A function to produce elements of the array given the two indices.
+
+ 'T[,]
+
+ The created array.
+ + Creates a based array given the dimensions and a generator function to compute the elements. +
+int
+ + The base for the first dimension of the array. +
+int
+ + The base for the second dimension of the array. +
+int
+ + The length of the first dimension of the array. +
+int
+ + The length of the second dimension of the array. +
+int -> int -> 'T
+ + A function to produce elements of the array given the two indices. +
+'T[,]
+ + The created array. +
++ + ArgumentException + + | ++ Thrown when base1, base2, length1, or length2 is negative. + | +
+
Array2D.initBased 1 1 2 3 (fun i j -> i + j)
+
+[[2; 3; 4]; [3; 4; 5]]
+
+
+
+
+ Array2D.iter action array
+ 'T -> unit
+ -
+ A function to apply to each element of the array.
+
+ 'T[,]
+ -
+ The input array.
+
+ 'T -> unit
+ + A function to apply to each element of the array. +
+'T[,]
+ + The input array. +
++
let inputs = array2D [ [ 3; 4 ]; [ 13; 14 ] ]
+
+ inputs |> Array2D.iter (fun v -> printfn $"value = {v}")
+
+unit
and prints
+ value = 3
+ value = 4
+ value = 13
+ value = 14
+
+
+
+ in the console.
+
+
+
+
+
+
+ + Applies the given function to each element of the array. The integer indices passed to the + function indicates the index of element. +
+int -> int -> 'T -> unit
+ + A function to apply to each element of the array with the indices available as an argument. +
+'T[,]
+ + The input array. +
++
let inputs = array2D [ [ 3; 4 ]; [ 13; 14 ] ]
+
+ inputs |> Array2D.iteri (fun i j v -> printfn $"value at ({i},{j}) = {v}")
+
+unit
and prints
+ value at (0,0) = 3
+ value at (0,1) = 4
+ value at (1,0) = 13
+ value at (1,1) = 14
+
+
+
+ in the console.
+
+
+
+
+
+
+ Array2D.length1 array
+
+
+
+
+ Array2D.length1 array
+ 'T[,]
+ -
+ The input array.
+
+ int
+
+ The length of the array in the first dimension.
+ 'T[,]
+ + The input array. +
+int
+ + The length of the array in the first dimension. +
++
let array = array2D [ [ 3; 4; 5 ]; [ 13; 14; 15 ] ]
+
+ array |> Array2D.length1
+
+2
.
+
+
+
+
+
+
+ Array2D.length2 array
+
+
+
+
+ Array2D.length2 array
+ 'T[,]
+ -
+ The input array.
+
+ int
+
+ The length of the array in the second dimension.
+ 'T[,]
+ + The input array. +
+int
+ + The length of the array in the second dimension. +
++
let array = array2D [ [ 3; 4; 5 ]; [ 13; 14; 15 ] ]
+
+ array |> Array2D.length2
+
+3
.
+
+
+
+
+
+ Array2D.map mapping array
+ 'T -> 'U
+ -
+ A function that is applied to transform each item of the input array.
+
+ 'T[,]
+ -
+ The input array.
+
+ 'U[,]
+
+ An array whose elements have been transformed by the given mapping.
+ + Builds a new array whose elements are the results of applying the given function + to each of the elements of the array. +
++ For non-zero-based arrays the basing on an input array will be propagated to the output + array. +
+'T -> 'U
+ + A function that is applied to transform each item of the input array. +
+'T[,]
+ + The input array. +
+'U[,]
+ + An array whose elements have been transformed by the given mapping. +
++
let inputs = array2D [ [ 3; 4 ]; [ 13; 14 ] ]
+
+ inputs |> Array2D.map (fun v -> 2 * v)
+
+[[6; 8;]; [26; 28]]
+
+
+
+
+ Array2D.mapi mapping array
+ int -> int -> 'T -> 'U
+ -
+ A function that is applied to transform each element of the array. The two integers
+ provide the index of the element.
+
+ 'T[,]
+ -
+ The input array.
+
+ 'U[,]
+
+ An array whose elements have been transformed by the given mapping.
+ + Builds a new array whose elements are the results of applying the given function + to each of the elements of the array. The integer indices passed to the + function indicates the element being transformed. +
++ For non-zero-based arrays the basing on an input array will be propagated to the output + array. +
+int -> int -> 'T -> 'U
+ + A function that is applied to transform each element of the array. The two integers + provide the index of the element. +
+'T[,]
+ + The input array. +
+'U[,]
+ + An array whose elements have been transformed by the given mapping. +
++
let inputs = array2D [ [ 3; 4 ]; [ 13; 14 ] ]
+
+ inputs |> Array2D.mapi (fun i j v -> i + j + v)
+
+[[3; 5;]; [14; 16]]
+
+
+
+
+
+ Array2D.rebase array
+
+
+
+
+ Array2D.rebase array
+ 'T[,]
+ -
+ The input array.
+
+ 'T[,]
+
+ The zero-based output array.
+ + Builds a new array whose elements are the same as the input array but + where a non-zero-based input array generates a corresponding zero-based + output array. +
+'T[,]
+ + The input array. +
+'T[,]
+ + The zero-based output array. +
++
let inputs = Array2D.createBased 1 1 2 3 1
+
+ inputs |> Array2D.rebase
+
+[[1; 1]; [1; 1]]
+
+
+
+
+ Array2D.set array index1 index2 value
+ 'T[,]
+ -
+ The input array.
+
+ int
+ -
+ The index along the first dimension.
+
+ int
+ -
+ The index along the second dimension.
+
+ 'T
+ -
+ The value to set in the array.
+
+
+ Sets the value of an element in an array. You can also use the syntax array.[index1,index2] <- value
.
+
+ + Indexer syntax is generally preferred, e.g. +
let array = Array2D.zeroCreate 2 2
+
+ array[0,1] <- 4.0
+
+'T[,]
+ + The input array. +
+int
+ + The index along the first dimension. +
+int
+ + The index along the second dimension. +
+'T
+ + The value to set in the array. +
++ + ArgumentException + + | ++ Thrown when the indices are negative or exceed the bounds of the array. + | +
+
let array = Array2D.zeroCreate 2 2
+
+ Array2D.set array 0 1 4.0
+
+array
is a 2x2 array with contents [[0.0; 4.0]; [0.0; 0.0]]
+
+
+
+
+
+ + Creates an array where the entries are initially Unchecked.defaultof<'T>. +
+int
+ + The length of the first dimension of the array. +
+int
+ + The length of the second dimension of the array. +
+'T[,]
+ + The created array. +
++ + ArgumentException + + | ++ Thrown when length1 or length2 is negative. + | +
+
Array2D.zeroCreate 2 3
+
+[[0; 0; 0]; [0; 0; 0]]
+
+
+
+
+
+ Array2D.zeroCreateBased base1 base2 length1 length2
+
+
+
+
+ Array2D.zeroCreateBased base1 base2 length1 length2
+ int
+ -
+ The base for the first dimension of the array.
+
+ int
+ -
+ The base for the second dimension of the array.
+
+ int
+ -
+ The length of the first dimension of the array.
+
+ int
+ -
+ The length of the second dimension of the array.
+
+ 'T[,]
+
+ The created array.
+ + Creates a based array where the entries are initially Unchecked.defaultof<'T>. +
+int
+ + The base for the first dimension of the array. +
+int
+ + The base for the second dimension of the array. +
+int
+ + The length of the first dimension of the array. +
+int
+ + The length of the second dimension of the array. +
+'T[,]
+ + The created array. +
++ + ArgumentException + + | ++ Thrown when base1, base2, length1, or length2 is negative. + | +
+
Array2D.zeroCreateBased 1 1 2 3
+
+[[0; 0; 0]; [0; 0; 0]]
+
+ + Contains operations for working with rank 3 arrays. +
++ + See also F# Language Guide - Arrays. + +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Array3D.create length1 length2 length3 initial
+ + + Parameters: +
int
+ -
+ The length of the first dimension.
+
+ + + + length2 + + : + int
+ -
+ The length of the second dimension.
+
+ + + + length3 + + : + int
+ -
+ The length of the third dimension.
+
+ + + + initial + + : + 'T
+ -
+ The value of the array elements.
+
+ + + + Returns: + 'T[,,]
+
+ The created array.
+ + |
+
+
+
+ + ++
+ Example +++
+module Array3D
+
+from Microsoft.FSharp.Collections
+val create: length1: int -> length2: int -> length3: int -> initial: 'T -> 'T array3d
+
+
+ Evaluates to a 2x3 array with contents [[[1; 1; 1]; [1; 1; 1]]; [[1; 1; 1]; [1; 1; 1]]]
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Array3D.get array index1 index2 index3
+ + + Parameters: +
'T[,,]
+ -
+ The input array.
+
+ + + + index1 + + : + int
+ -
+ The index along the first dimension.
+
+ + + + index2 + + : + int
+ -
+ The index along the second dimension.
+
+ + + + index3 + + : + int
+ -
+ The index along the third dimension.
+
+ + + + Returns: + 'T
+
+ The value at the given index.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Fetches an element from a 3D array. You can also use the syntax 'array.[index1,index2,index3]' + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Array3D.init length1 length2 length3 initializer
+ + + Parameters: +
int
+ -
+ The length of the first dimension.
+
+ + + + length2 + + : + int
+ -
+ The length of the second dimension.
+
+ + + + length3 + + : + int
+ -
+ The length of the third dimension.
+
+ + + + initializer + + : + int -> int -> int -> 'T
+ -
+ The function to create an initial value at each index into the array.
+
+ + + + Returns: + 'T[,,]
+
+ The created array.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Creates an array given the dimensions and a generator function to compute the elements. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Array3D.iter action array
+ + + Parameters: +
'T -> unit
+ -
+ The function to apply to each element of the array.
+
+ + + + array + + : + 'T[,,]
+ -
+ The input array.
+
+ + + |
+
+
+
+ + ++
+ Example +++
+val inputs: int array3d
+module Array3D
+
+from Microsoft.FSharp.Collections
+val init: length1: int -> length2: int -> length3: int -> initializer: (int -> int -> int -> 'T) -> 'T array3d
+val i: int
+val j: int
+val k: int
+val iter: action: ('T -> unit) -> array: 'T array3d -> unit
+val v: int
+val printfn: format: Printf.TextWriterFormat<'T> -> 'T
+
+
+ Evaluates to unit and prints
+
+
+
+ in the console.
+
+
+ |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Applies the given function to each element of the array. The integer indices passed to the + function indicates the index of element. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Array3D.length1 array
+ + + Parameters: +
'T[,,]
+ -
+ The input array.
+
+ + + + Returns: + int
+
+ The length of the array in the first dimension.
+ + |
+
+
+
+ + ++
+ Example +++
+Multiple items
+val array: int array3d -------------------- type 'T array = 'T array module Array3D
+
+from Microsoft.FSharp.Collections
+val init: length1: int -> length2: int -> length3: int -> initializer: (int -> int -> int -> 'T) -> 'T array3d
+val i: int
+val j: int
+val k: int
+val length1: array: 'T array3d -> int
+
+
+ Evaluates to 2 .
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Array3D.length2 array
+ + + Parameters: +
'T[,,]
+ -
+ The input array.
+
+ + + + Returns: + int
+
+ The length of the array in the second dimension.
+ + |
+
+
+
+ + ++
+ Example +++
+Multiple items
+val array: int array3d -------------------- type 'T array = 'T array module Array3D
+
+from Microsoft.FSharp.Collections
+val init: length1: int -> length2: int -> length3: int -> initializer: (int -> int -> int -> 'T) -> 'T array3d
+val i: int
+val j: int
+val k: int
+val length2: array: 'T array3d -> int
+
+
+ Evaluates to 3 .
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Array3D.length3 array
+ + + Parameters: +
'T[,,]
+ -
+ The input array.
+
+ + + + Returns: + int
+
+ The length of the array in the third dimension.
+ + |
+
+
+
+ + ++
+ Example +++
+Multiple items
+val array: int array3d -------------------- type 'T array = 'T array module Array3D
+
+from Microsoft.FSharp.Collections
+val init: length1: int -> length2: int -> length3: int -> initializer: (int -> int -> int -> 'T) -> 'T array3d
+val i: int
+val j: int
+val k: int
+val length3: array: 'T array3d -> int
+
+
+ Evaluates to 4 .
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Array3D.map mapping array
+ + + Parameters: +
'T -> 'U
+ -
+ The function to transform each element of the array.
+
+ + + + array + + : + 'T[,,]
+ -
+ The input array.
+
+ + + + Returns: + 'U[,,]
+
+ The array created from the transformed elements.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Builds a new array whose elements are the results of applying the given function + to each of the elements of the array. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Array3D.mapi mapping array
+ + + Parameters: +
int -> int -> int -> 'T -> 'U
+ -
+ The function to transform the elements at each index in the array.
+
+ + + + array + + : + 'T[,,]
+ -
+ The input array.
+
+ + + + Returns: + 'U[,,]
+
+ The array created from the transformed elements.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Builds a new array whose elements are the results of applying the given function + to each of the elements of the array. The integer indices passed to the + function indicates the element being transformed. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Array3D.set array index1 index2 index3 value
+ + + Parameters: +
'T[,,]
+ -
+ The input array.
+
+ + + + index1 + + : + int
+ -
+ The index along the first dimension.
+
+ + + + index2 + + : + int
+ -
+ The index along the second dimension.
+
+ + + + index3 + + : + int
+ -
+ The index along the third dimension.
+
+ + + + value + + : + 'T
+ -
+ The value to set at the given index.
+
+ + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Sets the value of an element in an array. You can also + use the syntax 'array.[index1,index2,index3] <- value'. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Array3D.zeroCreate length1 length2 length3
+ + + Parameters: +
int
+ -
+ The length of the first dimension.
+
+ + + + length2 + + : + int
+ -
+ The length of the second dimension.
+
+ + + + length3 + + : + int
+ -
+ The length of the third dimension.
+
+ + + + Returns: + 'T[,,]
+
+ The created array.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Creates an array where the entries are initially the "default" value. + + |
+
+ Contains operations for working with rank 4 arrays. +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ Array4D.create length1 length2 length3 length4 initial
+ + + Parameters: +
int
+ -
+ The length of the first dimension.
+
+ + + + length2 + + : + int
+ -
+ The length of the second dimension.
+
+ + + + length3 + + : + int
+ -
+ The length of the third dimension.
+
+ + + + length4 + + : + int
+ -
+ The length of the fourth dimension.
+
+ + + + initial + + : + 'T
+ -
+ The initial value for each element of the array.
+
+ + + + Returns: + 'T[,,,]
+
+ The created array.
+ + |
+
+
+
+ + ++
+ Example +++
+module Array4D
+
+from Microsoft.FSharp.Collections
+val create: length1: int -> length2: int -> length3: int -> length4: int -> initial: 'T -> 'T array4d
+
+
+ Evaluates to a 2x2x2x2 array with all entries 1
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Array4D.get array index1 index2 index3 index4
+ + + Parameters: +
'T[,,,]
+ -
+ The input array.
+
+ + + + index1 + + : + int
+ -
+ The index along the first dimension.
+
+ + + + index2 + + : + int
+ -
+ The index along the second dimension.
+
+ + + + index3 + + : + int
+ -
+ The index along the third dimension.
+
+ + + + index4 + + : + int
+ -
+ The index along the fourth dimension.
+
+ + + + Returns: + 'T
+
+ The value at the given index.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Fetches an element from a 4D array. You can also use the syntax 'array.[index1,index2,index3,index4]' + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Array4D.init length1 length2 length3 length4 initializer
+ + + Parameters: +
int
+ -
+ The length of the first dimension.
+
+ + + + length2 + + : + int
+ -
+ The length of the second dimension.
+
+ + + + length3 + + : + int
+ -
+ The length of the third dimension.
+
+ + + + length4 + + : + int
+ -
+ The length of the fourth dimension.
+
+ + + + initializer + + : + int -> int -> int -> int -> 'T
+ -
+ The function to create an initial value at each index in the array.
+
+ + + + Returns: + 'T[,,,]
+
+ The created array.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Creates an array given the dimensions and a generator function to compute the elements. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Array4D.length1 array
+ + + Parameters: +
'T[,,,]
+ -
+ The input array.
+
+ + + + Returns: + int
+
+ The length of the array in the first dimension.
+ + |
+
+
+
+ + ++
+ Example +++
+type 'T array = 'T array
+module Array4D
+
+from Microsoft.FSharp.Collections
+val init: length1: int -> length2: int -> length3: int -> length4: int -> initializer: (int -> int -> int -> int -> 'T) -> 'T array4d
+val i: int
+val j: int
+val k: int
+val length1: array: 'T array4d -> int
+
+
+ Evaluates to 2 .
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Array4D.length2 array
+ + + Parameters: +
'T[,,,]
+ -
+ The input array.
+
+ + + + Returns: + int
+
+ The length of the array in the second dimension.
+ + |
+
+
+
+ + ++
+ Example +++
+type 'T array = 'T array
+module Array4D
+
+from Microsoft.FSharp.Collections
+val init: length1: int -> length2: int -> length3: int -> length4: int -> initializer: (int -> int -> int -> int -> 'T) -> 'T array4d
+val i: int
+val j: int
+val k: int
+val length2: array: 'T array4d -> int
+
+
+ Evaluates to 3 .
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Array4D.length3 array
+ + + Parameters: +
'T[,,,]
+ -
+ The input array.
+
+ + + + Returns: + int
+
+ The length of the array in the third dimension.
+ + |
+
+
+
+ + ++
+ Example +++
+type 'T array = 'T array
+module Array4D
+
+from Microsoft.FSharp.Collections
+val init: length1: int -> length2: int -> length3: int -> length4: int -> initializer: (int -> int -> int -> int -> 'T) -> 'T array4d
+val i: int
+val j: int
+val k: int
+val length3: array: 'T array4d -> int
+
+
+ Evaluates to 4 .
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Array4D.length4 array
+ + + Parameters: +
'T[,,,]
+ -
+ The input array.
+
+ + + + Returns: + int
+
+ The length of the array in the fourth dimension.
+ + |
+
+
+
+ + ++
+ Example +++
+type 'T array = 'T array
+module Array4D
+
+from Microsoft.FSharp.Collections
+val init: length1: int -> length2: int -> length3: int -> length4: int -> initializer: (int -> int -> int -> int -> 'T) -> 'T array4d
+val i: int
+val j: int
+val k: int
+val length4: array: 'T array4d -> int
+
+
+ Evaluates to 5 .
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Array4D.set array index1 index2 index3 index4 value
+ + + Parameters: +
'T[,,,]
+ -
+ The input array.
+
+ + + + index1 + + : + int
+ -
+ The index along the first dimension.
+
+ + + + index2 + + : + int
+ -
+ The index along the second dimension.
+
+ + + + index3 + + : + int
+ -
+ The index along the third dimension.
+
+ + + + index4 + + : + int
+ -
+ The index along the fourth dimension.
+
+ + + + value + + : + 'T
+ -
+ The value to set.
+
+ + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Sets the value of an element in an array. You can also + use the syntax 'array.[index1,index2,index3,index4] <- value'. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Array4D.zeroCreate length1 length2 length3 length4
+ + + Parameters: +
int
+ -
+ The length of the first dimension.
+
+ + + + length2 + + : + int
+ -
+ The length of the second dimension.
+
+ + + + length3 + + : + int
+ -
+ The length of the third dimension.
+
+ + + + length4 + + : + int
+ -
+ The length of the fourth dimension.
+
+ + + + Returns: + 'T[,,,]
+
+ The created array.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Creates an array where the entries are initially the "default" value. + + |
+
+ Provides parallel operations on arrays +
++ Function or value + | ++ Description + | +||||
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Array.Parallel.average array
+ + + Parameters: +
^T[]
+ -
+ The input array.
+
+ + + + Returns: + ^T
+
+ The average of the elements in the array.
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+ + ++
+ Example +++
+module Array
+
+from Microsoft.FSharp.Collections
+module Parallel
+
+from Microsoft.FSharp.Collections.ArrayModule
+val average: array: 'T array -> 'T (requires member (+) and member DivideByInt)
+
+
+ Evaluates to 3.0
+
+ + Example +++
+module Array
+
+from Microsoft.FSharp.Collections
+module Parallel
+
+from Microsoft.FSharp.Collections.ArrayModule
+val average: array: 'T array -> 'T (requires member (+) and member DivideByInt)
+
+
+ Throws ArgumentException
+
+ |
+ ||||
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Array.Parallel.averageBy projection array
+ + + Parameters: +
'T -> ^U
+ -
+ The function to transform the array elements before averaging.
+
+ + + + array + + : + 'T[]
+ -
+ The input array.
+
+ + + + Returns: + ^U
+
+ The computed average.
+ + Modifiers: + inline + + Type parameters: + 'T, ^U + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns the average of the elements generated by applying the function to each element of the array. + + |
+
+ + ArgumentException + + | +
+ Thrown when array is empty.
+ |
+
+ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
type Foo = { Bar: float }
+
+ let input = [| {Bar = 2.0}; {Bar = 4.0} |]
+
+ input |> Array.Parallel.averageBy (fun foo -> foo.Bar)
+
+3.0
+
+ +
type Foo = { Bar: float }
+
+ let input : Foo[] = [| |]
+
+ input |> Array.Parallel.averageBy (fun foo -> foo.Bar)
+
+ArgumentException
+
+
+
+
+ Array.Parallel.choose chooser array
+ 'T -> 'U option
+ -
+ The function to generate options from the elements.
+
+ 'T[]
+ -
+ The input array.
+
+ 'U[]
+
+ The array of results.
+
+ Apply the given function to each element of the array. Return
+ the array comprised of the results x
for each element where
+ the function returns Some(x)
.
+
+ Performs the operation in parallel using Parallel.For. + The order in which the given function is applied to elements of the input array is not specified. +
+'T -> 'U option
+ + The function to generate options from the elements. +
+'T[]
+ + The input array. +
+'U[]
+ + The array of results. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let input = [| Some 1; None; Some 2 |]
+
+ input |> Array.Parallel.choose id
+
+[| 1; 2 |]
+
+ +
let input = [| 1; 2; 3 |]
+
+ input |> Array.Parallel.choose (fun n -> if n % 2 = 0 then Some n else None)
+
+[| 2 |]
+
+
+
+
+ Array.Parallel.collect mapping array
+ 'T -> 'U[]
+ -
+
+
+ 'T[]
+ -
+ The input array.
+
+ 'U[]
+
+ 'U[]
+ + For each element of the array, apply the given function. Concatenate all the results and return the combined array. +
++ Performs the operation in parallel using Parallel.For. + The order in which the given function is applied to elements of the input array is not specified. +
+'T -> 'U[]
+ + +
+'T[]
+ + The input array. +
+'U[]
+ + 'U[] +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
type Foo = { Bar: int[] }
+
+ let input = [| {Bar = [| 1; 2 |]}; {Bar = [| 3; 4 |]} |]
+
+ input |> Array.Parallel.collect (fun foo -> foo.Bar)
+
+[| 1; 2; 3; 4 |]
+
+ +
let input = [| [| 1; 2 |]; [| 3; 4 |] |]
+
+ input |> Array.Parallel.collect id
+
+[| 1; 2; 3; 4 |]
+
+
+
+
+
+
+ The predicate is applied to the elements of the input array in parallel. If any application
+ returns true then the overall result is true and testing of other elements in all threads is stopped at system's earliest convenience.
+ Otherwise, false
is returned.
+
'T -> bool
+ + The function to test the input elements. +
+'T[]
+ + The input array. +
+bool
+
+ True if any result from predicate
is true.
+
+ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let input = [| 1; 2; 3; 4; 5 |]
+
+ input |> Array.Parallel.exists (fun elm -> elm % 4 = 0)
+
+true
+
+ +
let input = [| 1; 2; 3; 4; 5 |]
+
+ input |> Array.Parallel.exists (fun elm -> elm % 6 = 0)
+
+false
+
+
+
+
+ Array.Parallel.filter predicate array
+ 'T -> bool
+ -
+ The function to test the input elements.
+
+ 'T[]
+ -
+ The input array.
+
+ 'T[]
+
+ An array containing the elements for which the given predicate returns true.
+
+ Returns a new collection containing only the elements of the collection
+ for which the given predicate returns true
.
+
'T -> bool
+ + The function to test the input elements. +
+'T[]
+ + The input array. +
+'T[]
+ + An array containing the elements for which the given predicate returns true. +
++ + ArgumentNullException + + | +
+ Thrown when the input array is null .
+ |
+
+
let inputs = [| 1; 2; 3; 4 |]
+
+ inputs |> Array.Parallel.filter (fun elm -> elm % 2 = 0)
+
+[| 2; 4 |]
+
+
+
+
+ Array.Parallel.forall predicate array
+ 'T -> bool
+ -
+ The function to test the input elements.
+
+ 'T[]
+ -
+ The input array.
+
+ bool
+
+ True if all of the array elements satisfy the predicate.
+ + The predicate is applied to the elements of the input collection in parallel. If any application + returns false then the overall result is false and testing of other elements in all threads is stopped at system's earliest convenience. + Otherwise, true is returned. +
+'T -> bool
+ + The function to test the input elements. +
+'T[]
+ + The input array. +
+bool
+ + True if all of the array elements satisfy the predicate. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let isEven a = a % 2 = 0
+
+ [2; 42] |> Array.Parallel.forall isEven // evaluates to true
+
+ [1; 2] |> Array.Parallel.forall isEven // evaluates to false
+
+
+
+
+ Array.Parallel.groupBy projection array
+ 'T -> 'Key
+ -
+ A function that transforms an element of the array into a comparable key.
+
+ 'T[]
+ -
+ The input array.
+
+ ('Key * 'T[])[]
+
+ The result array.
+ + Applies a key-generating function to each element of an array in parallel and yields an array of + unique keys. Each unique key contains an array of all elements that match + to this key. +
++ Performs the operation in parallel using Parallel.For. + The order in which the given function is applied to elements of the input array is not specified. + The order of the keys and values in the result is also not specified +
+'T -> 'Key
+ + A function that transforms an element of the array into a comparable key. +
+'T[]
+ + The input array. +
+('Key * 'T[])[]
+ + The result array. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let inputs = [| 1; 2; 3; 4; 5 |]
+
+ inputs |> Array.Parallel.groupBy (fun n -> n % 2)
+
+[| (1, [| 1; 3; 5 |]); (0, [| 2; 4 |]) |]
+
+
+
+
+
+ + Create an array given the dimension and a generator function to compute the elements. +
++ Performs the operation in parallel using Parallel.For. + The order in which the given function is applied to indices is not specified. +
+ +'T[]
+ + The array of results. +
++
Array.Parallel.init 4 (fun v -> v + 5)
+
+[| 5; 6; 7; 8 |]
+
+
+
+
+ Array.Parallel.iter action array
+ 'T -> unit
+ -
+
+
+ 'T[]
+ -
+ The input array.
+
+ + Performs the operation in parallel using Parallel.For. + The order in which the given function is applied to elements of the input array is not specified. +
+'T -> unit
+ + +
+'T[]
+ + The input array. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let inputs = [| "a"; "b"; "c" |]
+
+ inputs |> Array.Parallel.iter (printfn "%s")
+
+unit
and prints the following to the console in an unspecified order:
+ a
+ c
+ b
+
+
+
+
+
+
+
+
+ + Apply the given function to each element of the array. The integer passed to the + function indicates the index of element. +
++ Performs the operation in parallel using Parallel.For. + The order in which the given function is applied to elements of the input array is not specified. +
+int -> 'T -> unit
+ + +
+'T[]
+ + The input array. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let inputs = [| "a"; "b"; "c" |]
+
+ inputs |> Array.Parallel.iteri (fun i v -> printfn "{i}: {v}")
+
+unit
and prints the following to the console in an unspecified order:
+ 0: a
+ 2: c
+ 1: b
+
+
+
+
+
+
+
+ Array.Parallel.map mapping array
+ 'T -> 'U
+ -
+
+
+ 'T[]
+ -
+ The input array.
+
+ 'U[]
+
+ The array of results.
+ + Build a new array whose elements are the results of applying the given function + to each of the elements of the array. +
++ Performs the operation in parallel using Parallel.For. + The order in which the given function is applied to elements of the input array is not specified. +
+'T -> 'U
+ + +
+'T[]
+ + The input array. +
+'U[]
+ + The array of results. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let inputs = [| "a"; "bbb"; "cc" |]
+
+ inputs |> Array.Parallel.map (fun x -> x.Length)
+
+[| 1; 3; 2 |]
+
+
+
+
+ Array.Parallel.mapi mapping array
+ int -> 'T -> 'U
+ -
+
+
+ 'T[]
+ -
+ The input array.
+
+ 'U[]
+
+ The array of results.
+ + Build a new array whose elements are the results of applying the given function + to each of the elements of the array. The integer index passed to the + function indicates the index of element being transformed. +
++ Performs the operation in parallel using Parallel.For. + The order in which the given function is applied to elements of the input array is not specified. +
+int -> 'T -> 'U
+ + +
+'T[]
+ + The input array. +
+'U[]
+ + The array of results. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let inputs = [| 10; 10; 10 |]
+
+ inputs |> Array.Parallel.mapi (fun i x -> i + x)
+
+[| 10; 11; 12 |]
+
+
+
+
+ Array.Parallel.max array
+ 'T[]
+ -
+ The input array.
+
+ 'T
+
+ The maximum element.
+ + Returns the greatest of all elements of the array, compared via Operators.max. +
++ Throws ArgumentException for empty arrays. +
+'T[]
+ + The input array. +
+'T
+ + The maximum element. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ + ArgumentException + + | ++ Thrown when the input array is empty. + | +
+
let inputs = [| 10; 12; 11 |]
+
+ inputs |> Array.Parallel.max
+
+12
+
+ +
let inputs: int[]= [| |]
+
+ inputs |> Array.Parallel.max
+
+System.ArgumentException
.
+
+
+
+
+
+ Array.Parallel.maxBy projection array
+ 'T -> 'U
+ -
+ The function to transform the elements into a type supporting comparison.
+
+ 'T[]
+ -
+ The input array.
+
+ 'T
+
+ The maximum element.
+ + Returns the greatest of all elements of the array, compared via Operators.max on the function result. +
++ Throws ArgumentException for empty arrays. +
+'T -> 'U
+ + The function to transform the elements into a type supporting comparison. +
+'T[]
+ + The input array. +
+'T
+ + The maximum element. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ + ArgumentException + + | ++ Thrown when the input array is empty. + | +
+
let inputs = [| "aaa"; "b"; "cccc" |]
+
+ inputs |> Array.Parallel.maxBy (fun s -> s.Length)
+
+"cccc"
+
+ +
let inputs: string[]= [| |]
+
+ inputs |> Array.Parallel.maxBy (fun s -> s.Length)
+
+System.ArgumentException
.
+
+
+
+
+
+ Array.Parallel.min array
+ 'T[]
+ -
+ The input array.
+
+ 'T
+
+ The minimum element.
+ + Returns the smallest of all elements of the array, compared via Operators.min. +
++ Throws ArgumentException for empty arrays +
+'T[]
+ + The input array. +
+'T
+ + The minimum element. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ + ArgumentException + + | ++ Thrown when the input array is empty. + | +
+
let inputs = [| 10; 12; 11 |]
+
+ inputs |> Array.Parallel.min
+
+10
+
+ +
let inputs: int[]= [| |]
+
+ inputs |> Array.Parallel.min
+
+System.ArgumentException
.
+
+
+
+
+
+ Array.Parallel.minBy projection array
+ 'T -> 'U
+ -
+ The function to transform the elements into a type supporting comparison.
+
+ 'T[]
+ -
+ The input array.
+
+ 'T
+
+ The minimum element.
+ + Returns the lowest of all elements of the array, compared via Operators.min on the function result. +
++ Throws ArgumentException for empty arrays. +
+'T -> 'U
+ + The function to transform the elements into a type supporting comparison. +
+'T[]
+ + The input array. +
+'T
+ + The minimum element. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ + ArgumentException + + | ++ Thrown when the input array is empty. + | +
+
let inputs = [| "aaa"; "b"; "cccc" |]
+
+ inputs |> Array.Parallel.minBy (fun s -> s.Length)
+
+"b"
+
+ +
let inputs: string[]= [| |]
+
+ inputs |> Array.Parallel.minBy (fun s -> s.Length)
+
+System.ArgumentException
.
+
+
+
+
+
+ Array.Parallel.partition predicate array
+ 'T -> bool
+ -
+ The function to test the input elements.
+
+ 'T[]
+ -
+ The input array.
+
+ 'T[] * 'T[]
+
+ The two arrays of results.
+ + Split the collection into two collections, containing the + elements for which the given predicate returns "true" and "false" + respectively +
++ Performs the operation in parallel using Parallel.For. + The order in which the given function is applied to indices is not specified. +
+'T -> bool
+ + The function to test the input elements. +
+'T[]
+ + The input array. +
+'T[] * 'T[]
+ + The two arrays of results. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let inputs = [| 1; 2; 3; 4 |]
+
+ inputs |> Array.Parallel.partition (fun x -> x % 2 = 0)
+
+([|2; 4|], [|1; 3|])
.
+
+
+
+
+
+ Array.Parallel.reduce reduction array
+ 'T -> 'T -> 'T
+ -
+ The function to reduce a pair of elements to a single element.
+
+ 'T[]
+ -
+ The input array.
+
+ 'T
+
+ Result of the reductions.
+ + Applies a function to each element of the array in parallel, threading an accumulator argument + through the computation for each thread involved in the computation. After processing entire input, results from all threads are reduced together. + Raises ArgumentException if the array is empty. +
++ The order of processing is not guaranteed. For that reason, the 'reduce' function argument should be commutative. + (That is, changing the order of execution must not affect the result) + Also, compared to the non-parallel version of Array.reduce, the 'reduce' function may be invoked more times due to the resulting reduction from participating threads. +
+'T -> 'T -> 'T
+ + The function to reduce a pair of elements to a single element. +
+'T[]
+ + The input array. +
+'T
+ + Result of the reductions. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ + ArgumentException + + | ++ Thrown when the input array is empty. + | +
+
let inputs = [| 1; 3; 4; 2 |]
+
+ inputs |> Array.Parallel.reduce (fun a b -> a + b)
+
+1 + 3 + 4 + 2
. However, the system could have decided to compute (1+3) and (4+2) first, and then put them together.
+
+
+
+
+
+
+ Array.Parallel.reduceBy projection reduction array
+
+
+
+
+ Array.Parallel.reduceBy projection reduction array
+ 'T -> 'U
+ -
+ The function to project from elements of the input array
+
+ 'U -> 'U -> 'U
+ -
+ The function to reduce a pair of projected elements to a single element.
+
+ 'T[]
+ -
+ The input array.
+
+ 'U
+
+ The final result of the reductions.
+ + Applies a projection function to each element of the array in parallel, reducing elements in each thread with a dedicated 'reduction' function. + After processing entire input, results from all threads are reduced together. + Raises ArgumentException if the array is empty. +
++ The order of processing is not guaranteed. For that reason, the 'reduction' function argument should be commutative. + (That is, changing the order of execution must not affect the result) +
+'T -> 'U
+ + The function to project from elements of the input array +
+'U -> 'U -> 'U
+ + The function to reduce a pair of projected elements to a single element. +
+'T[]
+ + The input array. +
+'U
+ + The final result of the reductions. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ + ArgumentException + + | ++ Thrown when the input array is empty. + | +
+
let inputs = [| "1"; "3"; "4"; "2" |]
+
+ inputs |> Array.Parallel.reduceBy (fun x -> int x) (+)
+
+1 + 3 + 4 + 2
. However, the system could have decided to compute (1+3) and (4+2) first, and then put them together.
+
+
+
+
+
+ Array.Parallel.sort array
+ 'T[]
+ -
+ The input array.
+
+ 'T[]
+
+ The sorted array.
+ + Sorts the elements of an array in parallel, returning a new array. Elements are compared using Operators.compare. +
++ This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. + For a stable sort, consider using Seq.Sort. +
+'T[]
+ + The input array. +
+'T[]
+ + The sorted array. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let input = [| 8; 4; 3; 1; 6; 1 |]
+
+ Array.Parallel.sort input
+
+[| 1; 1 3; 4; 6; 8 |]
.
+
+
+
+
+
+ Array.Parallel.sortBy projection array
+ 'T -> 'Key
+ -
+ The function to transform array elements into the type that is compared.
+
+ 'T[]
+ -
+ The input array.
+
+ 'T[]
+
+ The sorted array.
+ + Sorts the elements of an array in parallel, using the given projection for the keys and returning a new array. + Elements are compared using Operators.compare. +
++ This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. + For a stable sort, consider using Seq.Sort. +
+'T -> 'Key
+ + The function to transform array elements into the type that is compared. +
+'T[]
+ + The input array. +
+'T[]
+ + The sorted array. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let input = [| "a"; "bbb"; "cccc"; "dd" |]
+
+ input |> Array.Parallel.sortBy (fun s -> s.Length)
+
+[|"a"; "dd"; "bbb"; "cccc"|]
.
+
+
+
+
+
+
+ Array.Parallel.sortByDescending projection array
+
+
+
+
+ Array.Parallel.sortByDescending projection array
+ 'T -> 'Key
+ -
+ The function to transform array elements into the type that is compared.
+
+ 'T[]
+ -
+ The input array.
+
+ 'T[]
+
+ The sorted array.
+ + Sorts the elements of an array in parallel, in descending order, using the given projection for the keys and returning a new array. + Elements are compared using Operators.compare. +
++ This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. + For a stable sort, consider using Seq.Sort. +
+'T -> 'Key
+ + The function to transform array elements into the type that is compared. +
+'T[]
+ + The input array. +
+'T[]
+ + The sorted array. +
++
let input = [| "a"; "bbb"; "cccc"; "dd" |]
+
+ input |> Array.Parallel.sortByDescending (fun s -> s.Length)
+
+[|"cccc"; "bbb"; "dd"; "a"|]
.
+
+
+
+
+
+ Array.Parallel.sortDescending array
+ 'T[]
+ -
+ The input array.
+
+ 'T[]
+
+ The sorted array.
+ + Sorts the elements of an array in parallel, in descending order, returning a new array. Elements are compared using Operators.compare. +
++ This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. + For a stable sort, consider using Seq.Sort. +
+'T[]
+ + The input array. +
+'T[]
+ + The sorted array. +
++
let input = [| 8; 4; 3; 1; 6; 1 |]
+
+ input |> Array.Parallel.sortDescending
+
+[| 8; 6; 4; 3; 1; 1 |]
.
+
+
+
+
+
+ Array.Parallel.sortInPlace array
+ 'T[]
+ -
+ The input array.
+
+ + Sorts the elements of an array by mutating the array in-place in parallel, using the given comparison function. + Elements are compared using Operators.compare. +
+'T[]
+ + The input array. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let array = [| 8; 4; 3; 1; 6; 1 |]
+
+ Array.sortInPlace array
+
+array
contains [| 1; 1; 3; 4; 6; 8 |]
.
+
+
+
+
+
+ Array.Parallel.sortInPlaceBy projection array
+ 'T -> 'Key
+ -
+ The function to transform array elements into the type that is compared.
+
+ 'T[]
+ -
+ The input array.
+
+ + Sorts the elements of an array by mutating the array in-place in parallel, using the given projection for the keys. + Elements are compared using Operators.compare. +
++ This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. + For a stable sort, consider using Seq.Sort. +
+'T -> 'Key
+ + The function to transform array elements into the type that is compared. +
+'T[]
+ + The input array. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let array = [| "a"; "bbb"; "cccc"; "dd" |]
+
+ array |> Array.Parallel.sortInPlaceBy (fun s -> s.Length)
+
+array
contains [|"a"; "dd"; "bbb"; "cccc"|]
.
+
+
+
+
+
+ Array.Parallel.sortInPlaceWith comparer array
+ 'T -> 'T -> int
+ -
+ The function to compare pairs of array elements.
+
+ 'T[]
+ -
+ The input array.
+
+ + Sorts the elements of an array by mutating the array in-place in parallel, using the given comparison function as the order. +
+'T -> 'T -> int
+ + The function to compare pairs of array elements. +
+'T[]
+ + The input array. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ The following sorts entries using a comparison function that compares string lengths then index numbers: +
let compareEntries (n1: int, s1: string) (n2: int, s2: string) =
+ let c = compare s1.Length s2.Length
+ if c <> 0 then c else
+ compare n1 n2
+
+ let array = [| (0,"aa"); (1,"bbb"); (2,"cc"); (3,"dd") |]
+
+ array |> Array.Parallel.sortInPlaceWith compareEntries
+
+array
contains [|(0, "aa"); (2, "cc"); (3, "dd"); (1, "bbb")|]
.
+
+
+
+
+
+ Array.Parallel.sortWith comparer array
+ 'T -> 'T -> int
+ -
+ The function to compare pairs of array elements.
+
+ 'T[]
+ -
+ The input array.
+
+ 'T[]
+
+ The sorted array.
+ + Sorts the elements of an array in parallel, using the given comparison function as the order, returning a new array. +
++ This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. + For a stable sort, consider using Seq.Sort. +
+'T -> 'T -> int
+ + The function to compare pairs of array elements. +
+'T[]
+ + The input array. +
+'T[]
+ + The sorted array. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ Sort an array of pairs using a comparison function that compares string lengths then index numbers: +
let compareEntries (n1: int, s1: string) (n2: int, s2: string) =
+ let c = compare s1.Length s2.Length
+ if c <> 0 then c else
+ compare n1 n2
+
+ let input = [| (0,"aa"); (1,"bbb"); (2,"cc"); (3,"dd") |]
+
+ input |> Array.Parallel.sortWith compareEntries
+
+[|(0, "aa"); (2, "cc"); (3, "dd"); (1, "bbb")|]
.
+
+
+
+
+
+ Array.Parallel.sum array
+ ^T[]
+ -
+ The input array.
+
+ ^T
+
+ The resulting sum.
+ ^T[]
+ + The input array. +
+^T
+ + The resulting sum. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let input = [| 1; 5; 3; 2 |]
+
+ input |> Array.Parallel.sum
+
+11
.
+
+
+
+
+
+ Array.Parallel.sumBy projection array
+ 'T -> ^U
+ -
+ The function to transform the array elements into the type to be summed.
+
+ 'T[]
+ -
+ The input array.
+
+ ^U
+
+ The resulting sum.
+ + Returns the sum of the results generated by applying the function to each element of the array. +
+'T -> ^U
+ + The function to transform the array elements into the type to be summed. +
+'T[]
+ + The input array. +
+^U
+ + The resulting sum. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let input = [| "aa"; "bbb"; "cc" |]
+
+ input |> Array.Parallel.sumBy (fun s -> s.Length)
+
+7
.
+
+
+
+
+
+ Array.Parallel.tryFind predicate array
+ 'T -> bool
+ -
+ The function to test the input elements.
+
+ 'T[]
+ -
+ The input array.
+
+ 'T option
+
+ The first element that satisfies the predicate, or None.
+
+ Returns the first element for which the given function returns True
.
+ Returns None if no such element exists.
+
'T -> bool
+ + The function to test the input elements. +
+'T[]
+ + The input array. +
+'T option
+ + The first element that satisfies the predicate, or None. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ Try to find the first even number: +
let inputs = [| 1; 2; 3 |]
+
+ inputs |> Array.Parallel.tryFind (fun elm -> elm % 2 = 0)
+
+Some 2
.
+
+
+ + Try to find the first even number: +
let inputs = [| 1; 5; 3 |]
+
+ inputs |> Array.Parallel.tryFind (fun elm -> elm % 2 = 0)
+
+None
+
+
+
+
+ Array.Parallel.tryFindIndex predicate array
+ 'T -> bool
+ -
+ The function to test the input elements.
+
+ 'T[]
+ -
+ The input array.
+
+ int option
+
+ The index of the first element that satisfies the predicate, or None.
+
+ Returns the index of the first element in the array
+ that satisfies the given predicate.
+ Returns None
if no such element exists.
+
'T -> bool
+ + The function to test the input elements. +
+'T[]
+ + The input array. +
+int option
+ + The index of the first element that satisfies the predicate, or None. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ Try to find the index of the first even number: +
let inputs = [| 1; 2; 3; 4; 5 |]
+
+ inputs |> Array.Parallel.tryFindIndex (fun elm -> elm % 2 = 0)
+
+Some 1
+
+ + Try to find the index of the first even number: +
let inputs = [| 1; 3; 5; 7 |]
+
+ inputs |> Array.Parallel.tryFindIndex (fun elm -> elm % 2 = 0)
+
+None
+
+
+
+
+ Array.Parallel.tryPick chooser array
+ 'T -> 'U option
+ -
+ The function to transform the array elements into options.
+
+ 'T[]
+ -
+ The input array.
+
+ 'U option
+
+ The first transformed element that is Some(x)
.
+
+ Applies the given function to successive elements, returning the first
+ result where the function returns Some(x)
for some x
. If the function
+ never returns Some(x)
then None
is returned.
+
'T -> 'U option
+ + The function to transform the array elements into options. +
+'T[]
+ + The input array. +
+'U option
+
+ The first transformed element that is Some(x)
.
+
+ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let input = [| 1; 2; 3 |]
+
+ input |> Array.Parallel.tryPick (fun n -> if n % 2 = 0 then Some (string n) else None)
+
+Some 2
.
+
+
+ +
let input = [| 1; 2; 3 |]
+
+ input |> Array.Parallel.tryPick (fun n -> if n > 3 = 0 then Some (string n) else None)
+
+None
.
+
+
+
+
+
+ Array.Parallel.zip array1 array2
+ 'T1[]
+ -
+ The first input array.
+
+ 'T2[]
+ -
+ The second input array.
+
+ ('T1 * 'T2)[]
+
+ The array of tupled elements.
+
+ Combines the two arrays into an array of pairs. The two arrays must have equal lengths, otherwise an ArgumentException
is
+ raised.
+
'T1[]
+ + The first input array. +
+'T2[]
+ + The second input array. +
+('T1 * 'T2)[]
+ + The array of tupled elements. +
++ + ArgumentNullException + + | ++ Thrown when either of the input arrays is null. + | +
+ + ArgumentException + + | ++ Thrown when the input arrays differ in length. + | +
+
let numbers = [|1; 2|]
+ let names = [|"one"; "two"|]
+
+ Array.Parallel.zip numbers names
+
+[| (1, "one"); (2, "two") |]
.
+
+
+ + Contains operations for working with arrays. +
++ + See also F# Language Guide - Arrays. + +
++ Modules + | ++ Description + | +
+ + + + Parallel + + + + |
+ + + | +
+ Function or value + | ++ Description + | +||||||
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Array.allPairs array1 array2
+ + + Parameters: +
'T1[]
+ -
+ The first input array.
+
+ + + + array2 + + : + 'T2[]
+ -
+ The second input array.
+
+ + + + Returns: + ('T1 * 'T2)[]
+
+ The resulting array of pairs.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns a new array that contains all pairings of elements from the first and second arrays. + + |
+
+ + ArgumentNullException + + | ++ Thrown when either of the input arrays is null. + | +
+
([| 1; 2 |], [| 3; 4 |]) ||> Array.allPairs
+
+ [| (1, 3); (1, 4); (2, 3); (2, 4) |]
+
+
+
+
+
+
+
+ Array.append array1 array2
+ 'T[]
+ -
+ The first input array.
+
+ 'T[]
+ -
+ The second input array.
+
+ 'T[]
+
+ The resulting array.
+ + Builds a new array that contains the elements of the first array followed by the elements of the second array. +
+'T[]
+ + The first input array. +
+'T[]
+ + The second input array. +
+'T[]
+ + The resulting array. +
++ + ArgumentNullException + + | ++ Thrown when either of the input arrays is null. + | +
+
Array.append [| 1; 2 |] [| 3; 4 |]
+
+[| 1; 2; 3; 4 |]
.
+
+
+
+
+
+
+ Array.average array
+
+
+
+
+ Array.average array
+ ^T[]
+ -
+ The input array.
+
+ ^T
+
+ The average of the elements in the array.
+ ^T[]
+ + The input array. +
+^T
+ + The average of the elements in the array. +
++ + ArgumentException + + | +
+ Thrown when array is empty.
+ |
+
+ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
[| 1.0; 2.0; 6.0 |] |> Array.average
+
+3.0
+
+ +
[| |] |> Array.average
+
+ArgumentException
+
+
+
+
+ Array.averageBy projection array
+ 'T -> ^U
+ -
+ The function to transform the array elements before averaging.
+
+ 'T[]
+ -
+ The input array.
+
+ ^U
+
+ The computed average.
+ + Returns the average of the elements generated by applying the function to each element of the array. +
+'T -> ^U
+ + The function to transform the array elements before averaging. +
+'T[]
+ + The input array. +
+^U
+ + The computed average. +
++ + ArgumentException + + | +
+ Thrown when array is empty.
+ |
+
+ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
type Foo = { Bar: float }
+
+ let input = [| {Bar = 2.0}; {Bar = 4.0} |]
+
+ input |> Array.averageBy (fun foo -> foo.Bar)
+
+3.0
+
+ +
type Foo = { Bar: float }
+
+ let input : Foo[] = [| |]
+
+ input |> Array.averageBy (fun foo -> foo.Bar)
+
+ArgumentException
+
+
+
+
+
+ Array.blit source sourceIndex target targetIndex count
+
+
+
+
+ Array.blit source sourceIndex target targetIndex count
+ 'T[]
+ -
+ The source array.
+
+ int
+ -
+ The starting index of the source array.
+
+ 'T[]
+ -
+ The target array.
+
+ int
+ -
+ The starting index of the target array.
+
+ int
+ -
+ The number of elements to copy.
+
+ + Reads a range of elements from the first array and write them into the second. +
++ + Slicing syntax is generally preferred, e.g. +
let source = [| 12; 13; 14 |]
+ let target = [| 0; 1; 2; 3; 4; 5 |]
+ target[3..4] <- source[1..2]
+
+'T[]
+ + The source array. +
+int
+ + The starting index of the source array. +
+'T[]
+ + The target array. +
+int
+ + The starting index of the target array. +
+int
+ + The number of elements to copy. +
++ + ArgumentNullException + + | ++ Thrown when either of the input arrays is null. + | +
+ + ArgumentException + + | ++ Thrown when any of sourceIndex, targetIndex or count are negative, + or when there aren't enough elements in source or target. + | +
+
let source = [| 12; 13; 14 |]
+ let target = [| 0; 1; 2; 3; 4; 5 |]
+
+ Array.blit source 1 target 3 2
+
+target
contains [| 0; 1; 2; 13; 14; 5 |]
.
+
+
+
+
+
+ Array.choose chooser array
+ 'T -> 'U option
+ -
+ The function to generate options from the elements.
+
+ 'T[]
+ -
+ The input array.
+
+ 'U[]
+
+ The array of results.
+
+ Applies the given function to each element of the array. Returns
+ the array comprised of the results x
for each element where
+ the function returns Some(x)
+
'T -> 'U option
+ + The function to generate options from the elements. +
+'T[]
+ + The input array. +
+'U[]
+ + The array of results. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let input = [| Some 1; None; Some 2 |]
+
+ input |> Array.choose id
+
+[| 1; 2 |]
+
+ +
let input = [| 1; 2; 3 |]
+
+ input |> Array.choose (fun n -> if n % 2 = 0 then Some n else None)
+
+[| 2 |]
+
+
+
+
+ Array.chunkBySize chunkSize array
+ int
+ -
+ The maximum size of each chunk.
+
+ 'T[]
+ -
+ The input array.
+
+ 'T[][]
+
+ The array divided into chunks.
+ int
+ + The maximum size of each chunk. +
+'T[]
+ + The input array. +
+'T[][]
+ + The array divided into chunks. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ + ArgumentException + + | +
+ Thrown when chunkSize is not positive.
+ |
+
+
let input = [| 1; 2; 3 |]
+
+ input |> Array.chunkBySize 2
+
+[| [|1; 2|]; [|3|] |]
+
+ +
let input = [| 1; 2; 3 |]
+
+ input |> Array.chunkBySize -2
+
+ArgumentException
+
+
+
+
+ Array.collect mapping array
+ 'T -> 'U[]
+ -
+ The function to create sub-arrays from the input array elements.
+
+ 'T[]
+ -
+ The input array.
+
+ 'U[]
+
+ The concatenation of the sub-arrays.
+ + For each element of the array, applies the given function. Concatenates all the results and return the combined array. +
+'T -> 'U[]
+ + The function to create sub-arrays from the input array elements. +
+'T[]
+ + The input array. +
+'U[]
+ + The concatenation of the sub-arrays. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
type Foo = { Bar: int[] }
+
+ let input = [| {Bar = [| 1; 2 |]}; {Bar = [| 3; 4 |]} |]
+
+ input |> Array.collect (fun foo -> foo.Bar)
+
+[| 1; 2; 3; 4 |]
+
+ +
let input = [[1; 2]; [3; 4]]
+
+ input |> Array.collect id
+
+[| 1; 2; 3; 4 |]
+
+
+
+
+ Array.compareWith comparer array1 array2
+ 'T -> 'T -> int
+ -
+ A function that takes an element from each array and returns an int.
+ If it evaluates to a non-zero value iteration is stopped and that value is returned.
+
+ 'T[]
+ -
+ The first input array.
+
+ 'T[]
+ -
+ The second input array.
+
+ int
+
+ Returns the first non-zero result from the comparison function. If the first array has
+ a larger element, the return value is always positive. If the second array has a larger
+ element, the return value is always negative. When the elements are equal in the two
+ arrays, 1 is returned if the first array is longer, 0 is returned if they are equal in
+ length, and -1 is returned when the second array is longer.
+ + Compares two arrays using the given comparison function, element by element. +
+'T -> 'T -> int
+ + A function that takes an element from each array and returns an int. + If it evaluates to a non-zero value iteration is stopped and that value is returned. +
+'T[]
+ + The first input array. +
+'T[]
+ + The second input array. +
+int
+ + Returns the first non-zero result from the comparison function. If the first array has + a larger element, the return value is always positive. If the second array has a larger + element, the return value is always negative. When the elements are equal in the two + arrays, 1 is returned if the first array is longer, 0 is returned if they are equal in + length, and -1 is returned when the second array is longer. +
++ + ArgumentNullException + + | ++ Thrown when either of the input arrays + is null. + | +
+
let closerToNextDozen a b =
+ (a % 12).CompareTo(b % 12)
+
+ let input1 = [| 1; 10 |]
+ let input2 = [| 1; 10 |]
+
+ (input1, input2) ||> Array.compareWith closerToNextDozen
+
+0
+
+ +
let closerToNextDozen a b =
+ (a % 12).CompareTo(b % 12)
+
+ let input1 = [| 1; 5 |]
+ let input2 = [| 1; 8 |]
+
+ (input1, input2) ||> Array.compareWith closerToNextDozen
+
+-1
+
+ +
let closerToNextDozen a b =
+ (a % 12).CompareTo(b % 12)
+
+ let input1 = [| 1; 11 |]
+ let input2 = [| 1; 13 |]
+
+ (input1, input2) ||> Array.compareWith closerToNextDozen
+
+1
+
+ +
let closerToNextDozen a b =
+ (a % 12).CompareTo(b % 12)
+
+ let input1 = [| 1; 2 |]
+ let input2 = [| 1 |]
+
+ (input1, input2) ||> Array.compareWith closerToNextDozen
+
+1
+
+ +
let closerToNextDozen a b =
+ (a % 12).CompareTo(b % 12)
+
+ let input1 = [| 1 |]
+ let input2 = [| 1; 2 |]
+
+ (input1, input2) ||> Array.compareWith closerToNextDozen
+
+-1
+
+
+
+
+
+ Array.concat arrays
+
+
+
+
+ Array.concat arrays
+ 'T[] seq
+ -
+ The input sequence of arrays.
+
+ 'T[]
+
+ The concatenation of the sequence of input arrays.
+ + Builds a new array that contains the elements of each of the given sequence of arrays. +
+'T[] seq
+ + The input sequence of arrays. +
+'T[]
+ + The concatenation of the sequence of input arrays. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
let inputs = [ [| 1; 2 |]; [| 3 |]; [| 4; 5 |] ]
+
+ inputs |> Array.concat
+
+[| 1; 2; 3; 4; 5 |]
+
+
+
+
+ Array.contains value array
+ 'T
+ -
+ The value to locate in the input array.
+
+ 'T[]
+ -
+ The input array.
+
+ bool
+
+ True if the input array contains the specified element; false otherwise.
+ 'T
+ + The value to locate in the input array. +
+'T[]
+ + The input array. +
+bool
+ + True if the input array contains the specified element; false otherwise. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
[| 1; 2 |] |> Array.contains 2 // evaluates to true
+ [| 1; 2 |] |> Array.contains 5 // evaluates to false
+
+
+
+
+
+ Array.copy array
+
+
+
+
+ Array.copy array
+ 'T[]
+ -
+ The input array.
+
+ 'T[]
+
+ A copy of the input array.
+ 'T[]
+ + The input array. +
+'T[]
+ + A copy of the input array. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let source = [| 12; 13; 14 |]
+
+ Array.copy source
+
+[| 12; 13; 14 |]
.
+
+
+
+
+
+ Array.countBy projection array
+ 'T -> 'Key
+ -
+ A function transforming each item of the input array into a key to be
+ compared against the others.
+
+ 'T[]
+ -
+ The input array.
+
+ ('Key * int)[]
+
+ The result array.
+ + Applies a key-generating function to each element of an array and returns an array yielding unique + keys and their number of occurrences in the original array. +
+'T -> 'Key
+ + A function transforming each item of the input array into a key to be + compared against the others. +
+'T[]
+ + The input array. +
+('Key * int)[]
+ + The result array. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
type Foo = { Bar: string }
+
+ let inputs = [| {Bar = "a"}; {Bar = "b"}; {Bar = "a"} |]
+
+ inputs |> Array.countBy (fun foo -> foo.Bar)
+
+[| ("a", 2); ("b", 1) |]
+
+
+
+
+ Array.create count value
+ int
+ -
+ The length of the array to create.
+
+ 'T
+ -
+ The value for the elements.
+
+ 'T[]
+
+ The created array.
+ int
+ + The length of the array to create. +
+'T
+ + The value for the elements. +
+'T[]
+ + The created array. +
++ + ArgumentException + + | ++ Thrown when count is negative. + | +
+
Array.create 4 "a"
+
+[| "a"; "a"; "a"; "a" |]
.
+
+
+ +
let cell = ref "a"
+ let array = Array.create 2 cell
+ cell.Value <- "b"
+
+array
contains[| { contents = "a"}; { contents = "a"} |]
.
+ After evaluation of the last line array
contains[| { contents = "b"}; { contents = "b"} |]
.
+ Note each entry in the array is the same mutable cell object.
+
+
+
+
+
+
+ Array.distinct array
+
+
+
+
+ Array.distinct array
+ 'T[]
+ -
+ The input array.
+
+ 'T[]
+
+ The result array.
+ + Returns an array that contains no duplicate entries according to generic hash and + equality comparisons on the entries. + If an element occurs multiple times in the array then the later occurrences are discarded. +
+'T[]
+ + The input array. +
+'T[]
+ + The result array. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let input = [| 1; 1; 2; 3 |]
+
+ input |> Array.distinct
+
+[| 1; 2; 3 |]
+
+
+
+
+ Array.distinctBy projection array
+ 'T -> 'Key
+ -
+ A function transforming the array items into comparable keys.
+
+ 'T[]
+ -
+ The input array.
+
+ 'T[]
+
+ The result array.
+ + Returns an array that contains no duplicate entries according to the + generic hash and equality comparisons on the keys returned by the given key-generating function. + If an element occurs multiple times in the array then the later occurrences are discarded. +
+'T -> 'Key
+ + A function transforming the array items into comparable keys. +
+'T[]
+ + The input array. +
+'T[]
+ + The result array. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let inputs = [| {Bar = 1 };{Bar = 1}; {Bar = 2}; {Bar = 3} |]
+
+ inputs |> Array.distinctBy (fun foo -> foo.Bar)
+
+[| { Bar = 1 }; { Bar = 2 }; { Bar = 3 } |]
+
+
+
+
+
+ Array.empty
+
+
+
+
+ Array.empty
+ 'T[]
+
+ The empty array.
+ 'T[]
+ + The empty array. +
++
Array.empty // Evaluates to [| |]
+
+
+
+
+
+ Array.exactlyOne array
+
+
+
+
+ Array.exactlyOne array
+ 'T[]
+ -
+ The input array.
+
+ 'T
+
+ The only element of the array.
+ 'T[]
+ + The input array. +
+'T
+ + The only element of the array. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ + ArgumentException + + | ++ Thrown when the input does not have precisely one element. + | +
+
let inputs = [| "banana" |]
+
+ inputs |> Array.exactlyOne
+
+banana
+
+ +
let inputs = [| "pear"; "banana" |]
+
+ inputs |> Array.exactlyOne
+
+ArgumentException
+
+ +
let inputs: int[] = [| |]
+
+ inputs |> Array.exactlyOne
+
+ArgumentException
+
+
+
+
+ Array.except itemsToExclude array
+ 'T seq
+ -
+ A sequence whose elements that also occur in the input array will cause those elements to be
+ removed from the result.
+
+ 'T[]
+ -
+ An array whose elements that are not also in itemsToExclude will be returned.
+
+ 'T[]
+
+ An array that contains the distinct elements of array
that do not appear in itemsToExclude
.
+ + Returns a new list with the distinct elements of the input array which do not appear in the itemsToExclude sequence, + using generic hash and equality comparisons to compare values. +
+'T seq
+ + A sequence whose elements that also occur in the input array will cause those elements to be + removed from the result. +
+'T[]
+ + An array whose elements that are not also in itemsToExclude will be returned. +
+'T[]
+
+ An array that contains the distinct elements of array
that do not appear in itemsToExclude
.
+
+ + ArgumentNullException + + | ++ Thrown when either itemsToExclude or array is null. + | +
+
let original = [| 1; 2; 3; 4; 5 |]
+ let itemsToExclude = [| 1; 3; 5 |]
+
+ original |> Array.except itemsToExclude
+
+[| 2; 4 |]
+
+
+
+
+ Array.exists predicate array
+ 'T -> bool
+ -
+ The function to test the input elements.
+
+ 'T[]
+ -
+ The input array.
+
+ bool
+
+ True if any result from predicate
is true.
+ + The predicate is applied to the elements of the input array. If any application + returns true then the overall result is true and no further elements are tested. + Otherwise, false is returned. +
+'T -> bool
+ + The function to test the input elements. +
+'T[]
+ + The input array. +
+bool
+
+ True if any result from predicate
is true.
+
+ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let input = [| 1; 2; 3; 4; 5 |]
+
+ input |> Array.exists (fun elm -> elm % 4 = 0)
+
+true
+
+ +
let input = [| 1; 2; 3; 4; 5 |]
+
+ input |> Array.exists (fun elm -> elm % 6 = 0)
+
+false
+
+
+
+
+ Array.exists2 predicate array1 array2
+ 'T1 -> 'T2 -> bool
+ -
+ The function to test the input elements.
+
+ 'T1[]
+ -
+ The first input array.
+
+ 'T2[]
+ -
+ The second input array.
+
+ bool
+
+ True if any result from predicate
is true.
+ + Tests if any pair of corresponding elements of the arrays satisfies the given predicate. +
+
+ The predicate is applied to matching elements in the two collections up to the lesser of the
+ two lengths of the collections. If any application returns true then the overall result is
+ true and no further elements are tested. Otherwise, if one collections is longer
+ than the other then the ArgumentException
exception is raised.
+ Otherwise, false is returned.
+
'T1 -> 'T2 -> bool
+ + The function to test the input elements. +
+'T1[]
+ + The first input array. +
+'T2[]
+ + The second input array. +
+bool
+
+ True if any result from predicate
is true.
+
+ + ArgumentNullException + + | ++ Thrown when either of the input arrays is null. + | +
+ + ArgumentException + + | ++ Thrown when the input arrays differ in length. + | +
+
let inputs1 = [| 1; 2 |]
+ let inputs2 = [| 1; 2; 0 |]
+
+ (inputs1, inputs2) ||> Array.exists2 (fun a b -> a > b)
+
+false
+
+ +
let inputs1 = [| 1; 4 |]
+ let inputs2 = [| 1; 3; 5 |]
+
+ (inputs1, inputs2) ||> Array.exists2 (fun a b -> a > b)
+
+true
+
+
+
+
+ Array.fill target targetIndex count value
+ 'T[]
+ -
+ The target array.
+
+ int
+ -
+ The index of the first element to set.
+
+ int
+ -
+ The number of elements to set.
+
+ 'T
+ -
+ The value to set.
+
+ 'T[]
+ + The target array. +
+int
+ + The index of the first element to set. +
+int
+ + The number of elements to set. +
+'T
+ + The value to set. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ + ArgumentException + + | ++ Thrown when either targetIndex or count is negative. + | +
+
let target = [| 0; 1; 2; 3; 4; 5 |]
+
+ Array.fill target 3 2 100
+
+target
contains [| 0; 1; 2; 100; 100; 5 |]
.
+
+
+
+
+
+ Array.filter predicate array
+ 'T -> bool
+ -
+ The function to test the input elements.
+
+ 'T[]
+ -
+ The input array.
+
+ 'T[]
+
+ An array containing the elements for which the given predicate returns true.
+ + Returns a new collection containing only the elements of the collection + for which the given predicate returns "true". +
+'T -> bool
+ + The function to test the input elements. +
+'T[]
+ + The input array. +
+'T[]
+ + An array containing the elements for which the given predicate returns true. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let inputs = [| 1; 2; 3; 4 |]
+
+ inputs |> Array.filter (fun elm -> elm % 2 = 0)
+
+[| 2; 4 |]
+
+
+
+
+ Array.find predicate array
+ 'T -> bool
+ -
+ The function to test the input elements.
+
+ 'T[]
+ -
+ The input array.
+
+ 'T
+
+ The first element for which predicate
returns true.
+ + Returns the first element for which the given function returns 'true'. + Raise KeyNotFoundException if no such element exists. +
+'T -> bool
+ + The function to test the input elements. +
+'T[]
+ + The input array. +
+'T
+
+ The first element for which predicate
returns true.
+
+ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ + KeyNotFoundException + + | +
+ Thrown if predicate
+ never returns true.
+ |
+
+
let inputs = [| 1; 2; 3 |]
+
+ inputs |> Array.find (fun elm -> elm % 2 = 0)
+
+2
+
+ +
let inputs = [| 1; 2; 3 |]
+
+ inputs |> Array.find (fun elm -> elm % 6 = 0)
+
+KeyNotFoundException
+
+
+
+
+ Array.findBack predicate array
+ 'T -> bool
+ -
+ The function to test the input elements.
+
+ 'T[]
+ -
+ The input array.
+
+ 'T
+
+ The last element for which predicate
returns true.
+ + Returns the last element for which the given function returns 'true'. + Raise KeyNotFoundException if no such element exists. +
+'T -> bool
+ + The function to test the input elements. +
+'T[]
+ + The input array. +
+'T
+
+ The last element for which predicate
returns true.
+
+ + KeyNotFoundException + + | +
+ Thrown if predicate
+ never returns true.
+ |
+
+ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let inputs = [| 2; 3; 4 |]
+
+ inputs |> Array.findBack (fun elm -> elm % 2 = 0)
+
+4
+
+ +
let inputs = [| 2; 3; 4 |]
+
+ inputs |> Array.findBack (fun elm -> elm % 6 = 0)
+
+KeyNotFoundException
+
+
+
+
+ Array.findIndex predicate array
+ 'T -> bool
+ -
+ The function to test the input elements.
+
+ 'T[]
+ -
+ The input array.
+
+ int
+
+ The index of the first element in the array that satisfies the given predicate.
+ + Returns the index of the first element in the array + that satisfies the given predicate. Raise KeyNotFoundException if + none of the elements satisfy the predicate. +
+'T -> bool
+ + The function to test the input elements. +
+'T[]
+ + The input array. +
+int
+ + The index of the first element in the array that satisfies the given predicate. +
++ + KeyNotFoundException + + | +
+ Thrown if predicate
+ never returns true.
+ |
+
+ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let inputs = [| 1; 2; 3; 4; 5 |]
+
+ inputs |> Array.findIndex (fun elm -> elm % 2 = 0)
+
+1
+
+ +
let inputs = [| 1; 2; 3; 4; 5 |]
+ inputs |> Array.findIndex (fun elm -> elm % 6 = 0)
+
+KeyNotFoundException
+
+
+
+
+ Array.findIndexBack predicate array
+ 'T -> bool
+ -
+ The function to test the input elements.
+
+ 'T[]
+ -
+ The input array.
+
+ int
+
+ The index of the last element in the array that satisfies the given predicate.
+ + Returns the index of the last element in the array + that satisfies the given predicate. Raise KeyNotFoundException if + none of the elements satisfy the predicate. +
+'T -> bool
+ + The function to test the input elements. +
+'T[]
+ + The input array. +
+int
+ + The index of the last element in the array that satisfies the given predicate. +
++ + KeyNotFoundException + + | +
+ Thrown if predicate
+ never returns true.
+ |
+
+ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let inputs = [| 1; 2; 3; 4; 5 |]
+
+ inputs |> Array.findIndex (fun elm -> elm % 2 = 0)
+
+3
+
+ +
let inputs = [| 1; 2; 3; 4; 5 |]
+
+ inputs |> Array.findIndex (fun elm -> elm % 6 = 0)
+
+KeyNotFoundException
+
+
+
+
+ Array.fold folder state array
+ 'State -> 'T -> 'State
+ -
+ The function to update the state given the input elements.
+
+ 'State
+ -
+ The initial state.
+
+ 'T[]
+ -
+ The input array.
+
+ 'State
+
+ The final state.
+
+ Applies a function to each element of the collection, threading an accumulator argument
+ through the computation. If the input function is f
and the elements are i0...iN
then computes
+ f (... (f s i0)...) iN
+
'State -> 'T -> 'State
+ + The function to update the state given the input elements. +
+'State
+ + The initial state. +
+'T[]
+ + The input array. +
+'State
+ + The final state. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
type Charge =
+ | In of int
+ | Out of int
+
+ let inputs = [| In 1; Out 2; In 3 |]
+
+ (0, inputs) ||> Array.fold (fun acc charge ->
+ match charge with
+ | In i -> acc + i
+ | Out o -> acc - o)
+
+2
+
+
+
+
+ Array.fold2 folder state array1 array2
+ 'State -> 'T1 -> 'T2 -> 'State
+ -
+ The function to update the state given the input elements.
+
+ 'State
+ -
+ The initial state.
+
+ 'T1[]
+ -
+ The first input array.
+
+ 'T2[]
+ -
+ The second input array.
+
+ 'State
+
+ The final state.
+
+ Applies a function to pairs of elements drawn from the two collections,
+ left-to-right, threading an accumulator argument
+ through the computation. The two input
+ arrays must have the same lengths, otherwise an ArgumentException
is
+ raised.
+
'State -> 'T1 -> 'T2 -> 'State
+ + The function to update the state given the input elements. +
+'State
+ + The initial state. +
+'T1[]
+ + The first input array. +
+'T2[]
+ + The second input array. +
+'State
+ + The final state. +
++ + ArgumentNullException + + | ++ Thrown when either of the input arrays is null. + | +
+ + ArgumentException + + | ++ Thrown when the input arrays differ in length. + | +
+
type CoinToss = Head | Tails
+
+ let data1 = [| Tails; Head; Tails |]
+ let data2 = [| Tails; Head; Head |]
+
+ (0, data1, data2) |||> Array.fold2 (fun acc a b ->
+ match (a, b) with
+ | Head, Head -> acc + 1
+ | Tails, Tails -> acc + 1
+ | _ -> acc - 1)
+
+1
+
+
+
+
+ Array.foldBack folder array state
+ 'T -> 'State -> 'State
+ -
+ The function to update the state given the input elements.
+
+ 'T[]
+ -
+ The input array.
+
+ 'State
+ -
+ The initial state.
+
+ 'State
+
+ The state object after the folding function is applied to each element of the array.
+
+ Applies a function to each element of the array, starting from the end, threading an accumulator argument
+ through the computation. If the input function is f
and the elements are i0...iN
then computes
+ f i0 (...(f iN s))
+
'T -> 'State -> 'State
+ + The function to update the state given the input elements. +
+'T[]
+ + The input array. +
+'State
+ + The initial state. +
+'State
+ + The state object after the folding function is applied to each element of the array. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
type Count =
+ { Positive: int
+ Negative: int
+ Text: string }
+
+ let sequence = [| 1; 0; -1; -2; 3 |]
+ let initialState = {Positive = 0; Negative = 0; Text = "" }
+
+ (sequence, initialState) ||> Array.foldBack (fun a acc ->
+ let text = acc.Text + " " + string a
+ if a >= 0 then
+ { acc with
+ Positive = acc.Positive + 1
+ Text = text }
+ else
+ { acc with
+ Negative = acc.Negative + 1
+ Text = text })
+
+ { Positive = 2
+ Negative = 3
+ Text = " 3 -2 -1 0 1" }
+
+
+
+
+
+
+
+ Array.foldBack2 folder array1 array2 state
+ 'T1 -> 'T2 -> 'State -> 'State
+ -
+ The function to update the state given the input elements.
+
+ 'T1[]
+ -
+ The first input array.
+
+ 'T2[]
+ -
+ The second input array.
+
+ 'State
+ -
+ The initial state.
+
+ 'State
+
+ The final state.
+
+ Apply a function to pairs of elements drawn from the two collections, right-to-left,
+ threading an accumulator argument through the computation. The two input
+ arrays must have the same lengths, otherwise an ArgumentException
is
+ raised.
+
'T1 -> 'T2 -> 'State -> 'State
+ + The function to update the state given the input elements. +
+'T1[]
+ + The first input array. +
+'T2[]
+ + The second input array. +
+'State
+ + The initial state. +
+'State
+ + The final state. +
++ + ArgumentNullException + + | ++ Thrown when either of the input arrays is null. + | +
+ + ArgumentException + + | ++ Thrown when the input arrays differ in length. + | +
+
Count the positives, negatives and accumulate some text from back to front:
+ type Count =
+ { Positive: int
+ Negative: int
+ Text: string }
+
+ let inputs1 = [| -1; -2; -3 |]
+ let inputs2 = [| 3; 2; 1 |]
+ let initialState = {Positive = 0; Negative = 0; Text = ""}
+
+ (inputs1, inputs2, initialState) |||> Array.foldBack2 (fun a b acc ->
+ let text = acc.Text + "(" + string a + "," + string b + ") "
+ if a + b >= 0 then
+ { acc with
+ Positive = acc.Positive + 1
+ Text = text }
+ else
+ { acc with
+ Negative = acc.Negative + 1
+ Text = text }
+ )
+
+ { Positive = 2
+ Negative = 1
+ Text = "(-3,1) (-2,2) (-1,3) " }
+
+
+
+
+
+
+
+
+ + The predicate is applied to the elements of the input collection. If any application + returns false then the overall result is false and no further elements are tested. + Otherwise, true is returned. +
+'T -> bool
+ + The function to test the input elements. +
+'T[]
+ + The input array. +
+bool
+ + True if all of the array elements satisfy the predicate. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let isEven a = a % 2 = 0
+
+ [2; 42] |> Array.forall isEven // evaluates to true
+
+ [1; 2] |> Array.forall isEven // evaluates to false
+
+
+
+
+ Array.forall2 predicate array1 array2
+ 'T1 -> 'T2 -> bool
+ -
+ The function to test the input elements.
+
+ 'T1[]
+ -
+ The first input array.
+
+ 'T2[]
+ -
+ The second input array.
+
+ bool
+
+ True if all of the array elements satisfy the predicate.
+ + Tests if all corresponding elements of the array satisfy the given predicate pairwise. +
+
+ The predicate is applied to matching elements in the two collections up to the lesser of the
+ two lengths of the collections. If any application returns false then the overall result is
+ false and no further elements are tested. Otherwise, if one collection is longer
+ than the other then the ArgumentException
exception is raised.
+ Otherwise, true is returned.
+
'T1 -> 'T2 -> bool
+ + The function to test the input elements. +
+'T1[]
+ + The first input array. +
+'T2[]
+ + The second input array. +
+bool
+ + True if all of the array elements satisfy the predicate. +
++ + ArgumentNullException + + | ++ Thrown when either of the input arrays is null. + | +
+ + ArgumentException + + | ++ Thrown when the input arrays differ in length. + | +
+
let inputs1 = [| 1; 2; 3 |]
+ let inputs2 = [| 1; 2; 3 |]
+
+ (inputs1, inputs2) ||> Array.forall2 (=)
+
+true
.
+
+
+ +
let items1 = [| 2017; 1; 1 |]
+ let items2 = [| 2019; 19; 8 |]
+
+ (items1, items2) ||> Array.forall2 (=)
+
+false
.
+
+
+ +
let items1 = [| 1; 2; 3 |]
+ let items2 = [| 1; 2 |]
+
+ (items1, items2) ||> Array.forall2 (=)
+
+ArgumentException
.
+
+
+
+
+
+
+ Array.get array index
+
+
+
+
+ Array.get array index
+ 'T[]
+ -
+ The input array.
+
+ int
+ -
+ The input index.
+
+ 'T
+
+ The value of the array at the given index.
+
+ Normally the syntax array[index]
is preferred.
+
'T[]
+ + The input array. +
+int
+ + The input index. +
+'T
+ + The value of the array at the given index. +
++ + NullReferenceException + + | ++ Thrown when the input array is null. + | +
+ + IndexOutOfRangeException + + | ++ Thrown when the index is negative or the input array does not contain enough elements. + | +
+
let inputs = [| "a"; "b"; "c" |]
+
+ Array.get inputs 1
+
+"b"
+
+ +
let inputs = [| "a"; "b"; "c" |]
+
+ Array.get inputs 4
+
+IndexOutOfRangeException
+
+
+
+
+ Array.groupBy projection array
+ 'T -> 'Key
+ -
+ A function that transforms an element of the array into a comparable key.
+
+ 'T[]
+ -
+ The input array.
+
+ ('Key * 'T[])[]
+
+ The result array.
+ + Applies a key-generating function to each element of an array and yields an array of + unique keys. Each unique key contains an array of all elements that match + to this key. +
+'T -> 'Key
+ + A function that transforms an element of the array into a comparable key. +
+'T[]
+ + The input array. +
+('Key * 'T[])[]
+ + The result array. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let inputs = [| 1; 2; 3; 4; 5 |]
+
+ inputs |> Array.groupBy (fun n -> n % 2)
+
+[| (1, [| 1; 3; 5 |]); (0, [| 2; 4 |]) |]
+
+
+
+
+
+ Array.head array
+
+
+
+
+ Array.head array
+ 'T[]
+ -
+ The input array.
+
+ 'T
+
+ The first element of the array.
+ 'T[]
+ + The input array. +
+'T
+ + The first element of the array. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ + ArgumentException + + | ++ Thrown when the input array is empty. + | +
+
let inputs = [| "banana"; "pear" |]
+
+ inputs |> Array.head
+
+banana
+
+ +
[| |] |> Array.head
+
+ArgumentException
+
+
+
+
+
+ Array.indexed array
+
+
+
+
+ Array.indexed array
+ 'T[]
+ -
+ The input array.
+
+ (int * 'T)[]
+
+ The array of indexed elements.
+ + Builds a new array whose elements are the corresponding elements of the input array + paired with the integer index (from 0) of each element. +
+'T[]
+ + The input array. +
+(int * 'T)[]
+ + The array of indexed elements. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let inputs = [| "a"; "b"; "c" |]
+
+ inputs |> Array.indexed
+
+[| (0, "a"); (1, "b"); (2, "c") |]
+
+
+
+
+ Array.init count initializer
+ int
+ -
+ The number of elements to initialize.
+
+ int -> 'T
+ -
+ The function to generate the initial values for each index.
+
+ 'T[]
+
+ The created array.
+ + Creates an array given the dimension and a generator function to compute the elements. +
+int
+ + The number of elements to initialize. +
+int -> 'T
+ + The function to generate the initial values for each index. +
+'T[]
+ + The created array. +
++ + ArgumentException + + | ++ Thrown when count is negative. + | +
+
Array.init 4 (fun v -> v + 5)
+
+[| 5; 6; 7; 8 |]
+
+ +
Array.init -5 (fun v -> v + 5)
+
+ArgumentException
+
+
+
+
+ Array.insertAt index value source
+ int
+ -
+ The index where the item should be inserted.
+
+ 'T
+ -
+ The value to insert.
+
+ 'T[]
+ -
+ The input array.
+
+ 'T[]
+
+ The result array.
+ int
+ + The index where the item should be inserted. +
+'T
+ + The value to insert. +
+'T[]
+ + The input array. +
+'T[]
+ + The result array. +
++ + ArgumentException + + | ++ Thrown when index is below 0 or greater than source.Length. + | +
+
let inputs = [| 0; 1; 2 |]
+
+ inputs |> Array.insertAt 1 9
+
+[| 0; 9; 1; 2 |]
.
+
+
+
+
+
+ Array.insertManyAt index values source
+ int
+ -
+ The index where the items should be inserted.
+
+ 'T seq
+ -
+ The values to insert.
+
+ 'T[]
+ -
+ The input array.
+
+ 'T[]
+
+ The result array.
+ int
+ + The index where the items should be inserted. +
+'T seq
+ + The values to insert. +
+'T[]
+ + The input array. +
+'T[]
+ + The result array. +
++ + ArgumentException + + | ++ Thrown when index is below 0 or greater than source.Length. + | +
+
let inputs = [| 0; 1; 2 |]
+
+ inputs |> Array.insertManyAt 1 [8; 9]
+
+[| 0; 8; 9; 1; 2 |]
.
+
+
+
+
+
+
+ Array.isEmpty array
+
+
+
+
+ Array.isEmpty array
+ 'T[]
+ -
+ The input array.
+
+ bool
+
+ True if the array is empty.
+ 'T[]
+ + The input array. +
+bool
+ + True if the array is empty. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
[| |] |> Array.isEmpty
+
+true
+
+ +
[| "pear"; "banana" |] |> Array.isEmpty
+
+false
+
+
+
+
+
+ Array.item index array
+
+
+
+
+ Array.item index array
+ int
+ -
+ The input index.
+
+ 'T[]
+ -
+ The input array.
+
+ 'T
+
+ The value of the array at the given index.
+
+ Normally the syntax array[index]
is preferred.
+
int
+ + The input index. +
+'T[]
+ + The input array. +
+'T
+ + The value of the array at the given index. +
++ + NullReferenceException + + | ++ Thrown when the input array is null. + | +
+ + IndexOutOfRangeException + + | ++ Thrown when the index is negative or the input array does not contain enough elements. + | +
+
let inputs = [| "a"; "b"; "c" |]
+
+ inputs |> Array.item 1
+
+"b"
+
+ +
let inputs = [| "a"; "b"; "c" |]
+
+ inputs |> Array.item 4
+
+ArgumentException
+
+
+
+
+
+ Array.iter action array
+
+
+
+
+ Array.iter action array
+ 'T -> unit
+ -
+ The function to apply.
+
+ 'T[]
+ -
+ The input array.
+
+ 'T -> unit
+ + The function to apply. +
+'T[]
+ + The input array. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let inputs = [| "a"; "b"; "c" |]
+
+ inputs |> Array.iter (printfn "%s")
+
+unit
and prints
+ a
+ b
+ c
+
+
+
+ in the console.
+
+
+
+
+
+ Array.iter2 action array1 array2
+ 'T1 -> 'T2 -> unit
+ -
+ The function to apply.
+
+ 'T1[]
+ -
+ The first input array.
+
+ 'T2[]
+ -
+ The second input array.
+
+
+ Applies the given function to pair of elements drawn from matching indices in two arrays. The
+ two arrays must have the same lengths, otherwise an ArgumentException
is
+ raised.
+
'T1 -> 'T2 -> unit
+ + The function to apply. +
+'T1[]
+ + The first input array. +
+'T2[]
+ + The second input array. +
++ + ArgumentNullException + + | ++ Thrown when either of the input arrays is null. + | +
+ + ArgumentException + + | ++ Thrown when the input arrays differ in length. + | +
+
let inputs1 = [| "a"; "b"; "c" |]
+ let inputs2 = [| 1; 2; 3 |]
+
+ (inputs1, inputs2) ||> Array.iter2 (printfn "%s: %i")
+
+unit
and prints
+ a: 1
+ b: 2
+ c: 3
+
+
+
+ in the console.
+
+
+
+
+
+
+ + Applies the given function to each element of the array. The integer passed to the + function indicates the index of element. +
+int -> 'T -> unit
+ + The function to apply to each index and element. +
+'T[]
+ + The input array. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let inputs = [| "a"; "b"; "c" |]
+
+ inputs |> Array.iteri (fun i v -> printfn "{i}: {v}")
+
+unit
and prints
+ 0: a
+ 1: b
+ 2: c
+
+
+
+ in the console.
+
+
+
+
+
+ Array.iteri2 action array1 array2
+ int -> 'T1 -> 'T2 -> unit
+ -
+ The function to apply to each index and pair of elements.
+
+ 'T1[]
+ -
+ The first input array.
+
+ 'T2[]
+ -
+ The second input array.
+
+
+ Applies the given function to pair of elements drawn from matching indices in two arrays,
+ also passing the index of the elements. The two arrays must have the same lengths,
+ otherwise an ArgumentException
is raised.
+
int -> 'T1 -> 'T2 -> unit
+ + The function to apply to each index and pair of elements. +
+'T1[]
+ + The first input array. +
+'T2[]
+ + The second input array. +
++ + ArgumentNullException + + | ++ Thrown when either of the input arrays is null. + | +
+ + ArgumentException + + | ++ Thrown when the input arrays differ in length. + | +
+
let inputs1 = [| "a"; "b"; "c" |]
+ let inputs2 = [| "banana"; "pear"; "apple" |]
+
+ (inputs1, inputs2) ||> Array.iteri2 (fun i s1 s2 -> printfn "Index {i}: {s1} - {s2}")
+
+unit
and prints
+ Index 0: a - banana
+ Index 1: b - pear
+ Index 2: c - apple
+
+
+
+ in the console.
+
+
+
+
+
+
+ Array.last array
+
+
+
+
+ Array.last array
+ 'T[]
+ -
+ The input array.
+
+ 'T
+
+ The last element of the array.
+ 'T[]
+ + The input array. +
+'T
+ + The last element of the array. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ + ArgumentException + + | ++ Thrown when the input does not have any elements. + | +
+
[| "pear"; "banana" |] |> Array.last
+
+banana
+
+ +
[| |] |> Array.last
+
+ArgumentException
+
+
+
+
+
+ Array.length array
+
+
+
+
+ Array.length array
+ 'T[]
+ -
+ The input array.
+
+ int
+
+ The length of the array.
+ + Returns the length of an array. You can also use property arr.Length. +
+
+ The notation array.Length
is preferred.
+
'T[]
+ + The input array. +
+int
+ + The length of the array. +
++ + NullReferenceException + + | ++ Thrown when the input array is null. + | +
+
let inputs = [| "a"; "b"; "c" |]
+
+ inputs |> Array.length
+
+3
+
+
+
+
+
+ Array.map mapping array
+
+
+
+
+ Array.map mapping array
+ 'T -> 'U
+ -
+ The function to transform elements of the array.
+
+ 'T[]
+ -
+ The input array.
+
+ 'U[]
+
+ The array of transformed elements.
+ + Builds a new array whose elements are the results of applying the given function + to each of the elements of the array. +
+'T -> 'U
+ + The function to transform elements of the array. +
+'T[]
+ + The input array. +
+'U[]
+ + The array of transformed elements. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let inputs = [| "a"; "bbb"; "cc" |]
+
+ inputs |> Array.map (fun x -> x.Length)
+
+[| 1; 3; 2 |]
+
+
+
+
+ Array.map2 mapping array1 array2
+ 'T1 -> 'T2 -> 'U
+ -
+ The function to transform the pairs of the input elements.
+
+ 'T1[]
+ -
+ The first input array.
+
+ 'T2[]
+ -
+ The second input array.
+
+ 'U[]
+
+ The array of transformed elements.
+
+ Builds a new collection whose elements are the results of applying the given function
+ to the corresponding elements of the two collections pairwise. The two input
+ arrays must have the same lengths, otherwise an ArgumentException
is
+ raised.
+
'T1 -> 'T2 -> 'U
+ + The function to transform the pairs of the input elements. +
+'T1[]
+ + The first input array. +
+'T2[]
+ + The second input array. +
+'U[]
+ + The array of transformed elements. +
++ + ArgumentException + + | ++ Thrown when the input arrays differ in length. + | +
+ + ArgumentNullException + + | ++ Thrown when either of the input arrays is null. + | +
+
let inputs1 = [| "a"; "bad"; "good" |]
+ let inputs2 = [| 0; 2; 1 |]
+
+ (inputs1, inputs2) ||> Array.map2 (fun x y -> x[y])
+
+[| 'a'; 'd'; 'o' |]
+
+
+
+
+ Array.map3 mapping array1 array2 array3
+ 'T1 -> 'T2 -> 'T3 -> 'U
+ -
+ The function to transform the pairs of the input elements.
+
+ 'T1[]
+ -
+ The first input array.
+
+ 'T2[]
+ -
+ The second input array.
+
+ 'T3[]
+ -
+ The third input array.
+
+ 'U[]
+
+ The array of transformed elements.
+
+ Builds a new collection whose elements are the results of applying the given function
+ to the corresponding triples from the three collections. The three input
+ arrays must have the same length, otherwise an ArgumentException
is
+ raised.
+
'T1 -> 'T2 -> 'T3 -> 'U
+ + The function to transform the pairs of the input elements. +
+'T1[]
+ + The first input array. +
+'T2[]
+ + The second input array. +
+'T3[]
+ + The third input array. +
+'U[]
+ + The array of transformed elements. +
++ + ArgumentException + + | ++ Thrown when the input arrays differ in length. + | +
+ + ArgumentNullException + + | ++ Thrown when any of the input arrays is null. + | +
+
let inputs1 = [| "a"; "t"; "ti" |]
+ let inputs2 = [| "l"; "h"; "m" |]
+ let inputs3 = [| "l"; "e"; "e" |]
+
+ (inputs1, inputs2, inputs3) |||> Array.map3 (fun x y z -> x + y + z)
+
+[| "all"; "the"; "time" |]
+
+
+
+
+ Array.mapFold mapping state array
+ 'State -> 'T -> 'Result * 'State
+ -
+ The function to transform elements from the input array and accumulate the final value.
+
+ 'State
+ -
+ The initial state.
+
+ 'T[]
+ -
+ The input array.
+
+ 'Result[] * 'State
+
+ The array of transformed elements, and the final accumulated value.
+ + Combines map and fold. Builds a new array whose elements are the results of applying the given function + to each of the elements of the input array. The function is also used to accumulate a final value. +
+'State -> 'T -> 'Result * 'State
+ + The function to transform elements from the input array and accumulate the final value. +
+'State
+ + The initial state. +
+'T[]
+ + The input array. +
+'Result[] * 'State
+ + The array of transformed elements, and the final accumulated value. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
Accumulate the charges, and double them as well
+ type Charge =
+ | In of int
+ | Out of int
+
+ let inputs = [| In 1; Out 2; In 3 |]
+
+ let newCharges, balance =
+ (0, inputs) ||> Array.mapFold (fun acc charge ->
+ match charge with
+ | In i -> In (i*2), acc + i
+ | Out o -> Out (o*2), acc - o)
+
+newCharges
to [|In 2; Out 4; In 6|]
and balance
to 2
.
+
+
+
+
+
+ Array.mapFoldBack mapping array state
+ 'T -> 'State -> 'Result * 'State
+ -
+ The function to transform elements from the input array and accumulate the final value.
+
+ 'T[]
+ -
+ The input array.
+
+ 'State
+ -
+ The initial state.
+
+ 'Result[] * 'State
+
+ The array of transformed elements, and the final accumulated value.
+ + Combines map and foldBack. Builds a new array whose elements are the results of applying the given function + to each of the elements of the input array. The function is also used to accumulate a final value. +
+'T -> 'State -> 'Result * 'State
+ + The function to transform elements from the input array and accumulate the final value. +
+'T[]
+ + The input array. +
+'State
+ + The initial state. +
+'Result[] * 'State
+ + The array of transformed elements, and the final accumulated value. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ Accumulate the charges from back to front, and double them as well +
type Charge =
+ | In of int
+ | Out of int
+
+ let inputs = [| In 1; Out 2; In 3 |]
+
+ let newCharges, balance =
+ (inputs, 0) ||> Array.mapFoldBack (fun charge acc ->
+ match charge with
+ | In i -> In (i*2), acc + i
+ | Out o -> Out (o*2), acc - o)
+
+newCharges
to [|In 2; Out 4; In 6|]
and balance
to 2
.
+
+
+
+
+
+ Array.mapi mapping array
+ int -> 'T -> 'U
+ -
+ The function to transform elements and their indices.
+
+ 'T[]
+ -
+ The input array.
+
+ 'U[]
+
+ The array of transformed elements.
+ + Builds a new array whose elements are the results of applying the given function + to each of the elements of the array. The integer index passed to the + function indicates the index of element being transformed, starting at zero. +
+int -> 'T -> 'U
+ + The function to transform elements and their indices. +
+'T[]
+ + The input array. +
+'U[]
+ + The array of transformed elements. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let inputs = [| 10; 10; 10 |]
+
+ inputs |> Array.mapi (fun i x -> i + x)
+
+[| 10; 11; 12 |]
+
+
+
+
+ Array.mapi2 mapping array1 array2
+ int -> 'T1 -> 'T2 -> 'U
+ -
+ The function to transform pairs of input elements and their indices.
+
+ 'T1[]
+ -
+ The first input array.
+
+ 'T2[]
+ -
+ The second input array.
+
+ 'U[]
+
+ The array of transformed elements.
+
+ Builds a new collection whose elements are the results of applying the given function
+ to the corresponding elements of the two collections pairwise, also passing the index of
+ the elements. The two input arrays must have the same lengths, otherwise an ArgumentException
is
+ raised.
+
int -> 'T1 -> 'T2 -> 'U
+ + The function to transform pairs of input elements and their indices. +
+'T1[]
+ + The first input array. +
+'T2[]
+ + The second input array. +
+'U[]
+ + The array of transformed elements. +
++ + ArgumentNullException + + | ++ Thrown when either of the input arrays is null. + | +
+ + ArgumentException + + | ++ Thrown when the input arrays differ in length. + | +
+
let inputs1 = [| "a"; "bad"; "good" |]
+ let inputs2 = [| 0; 2; 1 |]
+
+ (inputs1, inputs2) ||> Array.mapi2 (fun i x y -> i, x[y])
+
+[|(0, 'a'); (1, 'd'); (2, 'o')|]
+
+
+
+
+
+ Array.max array
+
+
+
+
+ Array.max array
+ 'T[]
+ -
+ The input array.
+
+ 'T
+
+ The maximum element.
+ + Returns the greatest of all elements of the array, compared via Operators.max on the function result. +
++ Throws ArgumentException for empty arrays. +
+'T[]
+ + The input array. +
+'T
+ + The maximum element. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ + ArgumentException + + | ++ Thrown when the input array is empty. + | +
+
let inputs = [| 10; 12; 11 |]
+
+ inputs |> Array.max
+
+12
+
+ +
let inputs: int[]= [| |]
+
+ inputs |> Array.max
+
+System.ArgumentException
.
+
+
+
+
+
+ Array.maxBy projection array
+ 'T -> 'U
+ -
+ The function to transform the elements into a type supporting comparison.
+
+ 'T[]
+ -
+ The input array.
+
+ 'T
+
+ The maximum element.
+ + Returns the greatest of all elements of the array, compared via Operators.max on the function result. +
++ Throws ArgumentException for empty arrays. +
+'T -> 'U
+ + The function to transform the elements into a type supporting comparison. +
+'T[]
+ + The input array. +
+'T
+ + The maximum element. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ + ArgumentException + + | ++ Thrown when the input array is empty. + | +
+
let inputs = [| "aaa"; "b"; "cccc" |]
+
+ inputs |> Array.maxBy (fun s -> s.Length)
+
+"cccc"
+
+ +
let inputs: string[]= [| |]
+
+ inputs |> Array.maxBy (fun s -> s.Length)
+
+System.ArgumentException
.
+
+
+
+
+
+
+ Array.min array
+
+
+
+
+ Array.min array
+ 'T[]
+ -
+ The input array.
+
+ 'T
+
+ The minimum element.
+ + Returns the lowest of all elements of the array, compared via Operators.min. +
++ Throws ArgumentException for empty arrays +
+'T[]
+ + The input array. +
+'T
+ + The minimum element. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ + ArgumentException + + | ++ Thrown when the input array is empty. + | +
+
let inputs = [| 10; 12; 11 |]
+
+ inputs |> Array.min
+
+10
+
+ +
let inputs: int[]= [| |]
+
+ inputs |> Array.min
+
+System.ArgumentException
.
+
+
+
+
+
+ Array.minBy projection array
+ 'T -> 'U
+ -
+ The function to transform the elements into a type supporting comparison.
+
+ 'T[]
+ -
+ The input array.
+
+ 'T
+
+ The minimum element.
+ + Returns the lowest of all elements of the array, compared via Operators.min on the function result. +
++ Throws ArgumentException for empty arrays. +
+'T -> 'U
+ + The function to transform the elements into a type supporting comparison. +
+'T[]
+ + The input array. +
+'T
+ + The minimum element. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ + ArgumentException + + | ++ Thrown when the input array is empty. + | +
+
let inputs = [| "aaa"; "b"; "cccc" |]
+
+ inputs |> Array.minBy (fun s -> s.Length)
+
+"b"
+
+ +
let inputs: string[]= [| |]
+
+ inputs |> Array.minBy (fun s -> s.Length)
+
+System.ArgumentException
.
+
+
+
+
+
+
+ Array.ofList list
+
+
+
+
+ Array.ofList list
+ 'T list
+ -
+ The input list.
+
+ 'T[]
+
+ The array of elements from the list.
+ 'T list
+ + The input list. +
+'T[]
+ + The array of elements from the list. +
++
let inputs = [ 1; 2; 5 ]
+
+ inputs |> Array.ofList
+
+[| 1; 2; 5 |]
.
+
+
+
+
+
+
+ Array.ofSeq source
+
+
+
+
+ Array.ofSeq source
+ 'T seq
+ -
+ The input sequence.
+
+ 'T[]
+
+ The array of elements from the sequence.
+ 'T seq
+ + The input sequence. +
+'T[]
+ + The array of elements from the sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
let inputs = seq { 1; 2; 5 }
+
+ inputs |> Array.ofSeq
+
+[| 1; 2; 5 |]
.
+
+
+
+
+
+
+ Array.pairwise array
+
+
+
+
+ Array.pairwise array
+ 'T[]
+ -
+ The input array.
+
+ ('T * 'T)[]
+
+ The result array.
+ + Returns an array of each element in the input array and its predecessor, with the + exception of the first element which is only returned as the predecessor of the second element. +
+'T[]
+ + The input array. +
+('T * 'T)[]
+ + The result array. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
let inputs = [| 1; 2; 3; 4 |]
+
+ inputs |> Array.pairwise
+
+[|(1, 2); (2, 3); (3, 4)|]
.
+
+
+
+
+
+ Array.partition predicate array
+ 'T -> bool
+ -
+ The function to test the input elements.
+
+ 'T[]
+ -
+ The input array.
+
+ 'T[] * 'T[]
+
+ A pair of arrays. The first containing the elements the predicate evaluated to true,
+ and the second containing those evaluated to false.
+ + Splits the collection into two collections, containing the + elements for which the given predicate returns "true" and "false" + respectively. +
+'T -> bool
+ + The function to test the input elements. +
+'T[]
+ + The input array. +
+'T[] * 'T[]
+ + A pair of arrays. The first containing the elements the predicate evaluated to true, + and the second containing those evaluated to false. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let inputs = [| 1; 2; 3; 4 |]
+
+ inputs |> Array.partition (fun x -> x % 2 = 0)
+
+([|2; 4|], [|1; 3|])
.
+
+
+
+
+
+
+ + Returns an array with all elements permuted according to the + specified permutation. +
+int -> int
+ + The function that maps input indices to output indices. +
+'T[]
+ + The input array. +
+'T[]
+ + The output array. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ + ArgumentException + + | ++ Thrown when indexMap does not produce a valid permutation. + | +
+
let inputs = [| 1; 2; 3; 4 |]
+
+ inputs |> Array.permute (fun x -> (x + 1) % 4)
+
+[|4; 1; 2; 3|]
.
+
+
+
+
+
+ Array.pick chooser array
+ 'T -> 'U option
+ -
+ The function to generate options from the elements.
+
+ 'T[]
+ -
+ The input array.
+
+ 'U
+
+ The first result.
+
+ Applies the given function to successive elements, returning the first
+ result where the function returns Some(x)
for some x
. If the function
+ never returns Some(x)
then KeyNotFoundException is raised.
+
'T -> 'U option
+ + The function to generate options from the elements. +
+'T[]
+ + The input array. +
+'U
+ + The first result. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ + KeyNotFoundException + + | +
+ Thrown if every result from
+ chooser is None .
+ |
+
+
let input = [| 1; 2; 3 |]
+
+ input |> Array.pick (fun n -> if n % 2 = 0 then Some (string n) else None)
+
+"2"
.
+
+
+ +
let input = [| 1; 2; 3 |]
+
+ input |> Array.pick (fun n -> if n > 3 = 0 then Some (string n) else None)
+
+KeyNotFoundException
.
+
+
+
+
+
+ Array.reduce reduction array
+ 'T -> 'T -> 'T
+ -
+ The function to reduce a pair of elements to a single element.
+
+ 'T[]
+ -
+ The input array.
+
+ 'T
+
+ The final result of the reductions.
+
+ Applies a function to each element of the array, threading an accumulator argument
+ through the computation. If the input function is f
and the elements are i0...iN
+ then computes f (... (f i0 i1)...) iN
.
+ Raises ArgumentException if the array has size zero.
+
'T -> 'T -> 'T
+ + The function to reduce a pair of elements to a single element. +
+'T[]
+ + The input array. +
+'T
+ + The final result of the reductions. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ + ArgumentException + + | ++ Thrown when the input array is empty. + | +
+
let inputs = [| 1; 3; 4; 2 |]
+
+ inputs |> Array.reduce (fun a b -> a * 10 + b)
+
+1342
, by computing ((1 * 10 + 3) * 10 + 4) * 10 + 2
+
+
+
+
+ Array.reduceBack reduction array
+ 'T -> 'T -> 'T
+ -
+ A function that takes in the next-to-last element of the list and the
+ current accumulated result to produce the next accumulated result.
+
+ 'T[]
+ -
+ The input array.
+
+ 'T
+
+ The final result of the reductions.
+
+ Applies a function to each element of the array, starting from the end, threading an accumulator argument
+ through the computation. If the input function is f
and the elements are i0...iN
+ then computes f i0 (...(f iN-1 iN))
.
+
'T -> 'T -> 'T
+ + A function that takes in the next-to-last element of the list and the + current accumulated result to produce the next accumulated result. +
+'T[]
+ + The input array. +
+'T
+ + The final result of the reductions. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ + ArgumentException + + | ++ Thrown when the input array is empty. + | +
+
let inputs = [| 1; 3; 4; 2 |]
+
+ inputs |> Array.reduceBack (fun a b -> a + b * 10)
+
+2431
, by computing 1 + (3 + (4 + 2 * 10) * 10) * 10
+
+
+
+
+ Array.removeAt index source
+ int
+ -
+ The index of the item to be removed.
+
+ 'T[]
+ -
+ The input array.
+
+ 'T[]
+
+ The result array.
+ int
+ + The index of the item to be removed. +
+'T[]
+ + The input array. +
+'T[]
+ + The result array. +
++ + ArgumentException + + | ++ Thrown when index is outside 0..source.Length - 1 + | +
+
let inputs = [| 0; 1; 2 |]
+
+ inputs |> Array.removeAt 1
+
+[| 0; 2 |]
.
+
+
+
+
+
+ Array.removeManyAt index count source
+ int
+ -
+ The index of the item to be removed.
+
+ int
+ -
+ The number of items to remove.
+
+ 'T[]
+ -
+ The input array.
+
+ 'T[]
+
+ The result array.
+ + Return a new array with the number of items starting at a given index removed. +
+int
+ + The index of the item to be removed. +
+int
+ + The number of items to remove. +
+'T[]
+ + The input array. +
+'T[]
+ + The result array. +
++ + ArgumentException + + | ++ Thrown when index is outside 0..source.Length - count + | +
+
let inputs = [| 0; 1; 2; 3 |]
+
+ inputs |> Array.removeManyAt 1 2
+
+[| 0; 3 |]
.
+
+
+
+
+
+ Array.replicate count initial
+ int
+ -
+ The number of elements to replicate.
+
+ 'T
+ -
+ The value to replicate
+
+ 'T[]
+
+ The generated array.
+ int
+ + The number of elements to replicate. +
+'T
+ + The value to replicate +
+'T[]
+ + The generated array. +
++ + ArgumentException + + | ++ Thrown when count is negative. + | +
+
Array.replicate 3 "a"
+
+[| "a"; "a"; "a" |]
.
+
+
+
+
+
+
+ Array.rev array
+
+
+
+
+ Array.rev array
+ 'T[]
+ -
+ The input array.
+
+ 'T[]
+
+ The reversed array.
+ 'T[]
+ + The input array. +
+'T[]
+ + The reversed array. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
Array.rev [| 0; 1; 2 |]
+
+[| 2; 1; 0 |]
.
+
+
+
+
+
+ Array.scan folder state array
+ 'State -> 'T -> 'State
+ -
+ The function to update the state given the input elements.
+
+ 'State
+ -
+ The initial state.
+
+ 'T[]
+ -
+ The input array.
+
+ 'State[]
+
+ The array of state values.
+ 'State -> 'T -> 'State
+ + The function to update the state given the input elements. +
+'State
+ + The initial state. +
+'T[]
+ + The input array. +
+'State[]
+ + The array of state values. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ Apply a list charges and collect the running balances as each is applied: +
type Charge =
+ | In of int
+ | Out of int
+
+ let inputs = [| In 1; Out 2; In 3 |]
+
+ (0, inputs) ||> Array.scan (fun acc charge ->
+ match charge with
+ | In i -> acc + i
+ | Out o -> acc - o)
+
+[|0; 1; -1; 2|]
. Note 0
is the intial
+ state, 1
the next state, -1
the next state, and 2
the final state.
+
+
+
+
+
+ Array.scanBack folder array state
+ 'T -> 'State -> 'State
+ -
+ The function to update the state given the input elements.
+
+ 'T[]
+ -
+ The input array.
+
+ 'State
+ -
+ The initial state.
+
+ 'State[]
+
+ The array of state values.
+ 'T -> 'State -> 'State
+ + The function to update the state given the input elements. +
+'T[]
+ + The input array. +
+'State
+ + The initial state. +
+'State[]
+ + The array of state values. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ Apply a list charges from back to front, and collect the running balances as each is applied: +
type Charge =
+ | In of int
+ | Out of int
+
+ let inputs = [| In 1; Out 2; In 3 |]
+
+ (inputs, 0) ||> Array.scanBack (fun charge acc ->
+ match charge with
+ | In i -> acc + i
+ | Out o -> acc - o)
+
+ [|2; 1; 3; 0|]
by processing each input from back to front. Note 0
is the intial
+ state, 3
the next state, 1
the next state, and 2
the final state.
+
+
+
+
+
+ Array.set array index value
+ 'T[]
+ -
+ The input array.
+
+ int
+ -
+ The input index.
+
+ 'T
+ -
+ The input value.
+
+ 'T[]
+ + The input array. +
+int
+ + The input index. +
+'T
+ + The input value. +
++ + NullReferenceException + + | ++ Thrown when the input array is null. + | +
+ + IndexOutOfRangeException + + | ++ Thrown when the index is negative or the input array does not contain enough elements. + | +
+
let inputs = [| "a"; "b"; "c" |]
+
+ Array.set inputs 1 "B"
+
+inputs
contains [| "a"; "B"; "c" |]
+
+ +
let inputs = [| "a"; "b"; "c" |]
+
+ Array.set inputs 4 "d"
+
+IndexOutOfRangeException
+
+
+
+
+
+ Array.singleton value
+
+
+
+
+ Array.singleton value
+ 'T
+ -
+ The input item.
+
+ 'T[]
+
+ The result array of one item.
+ 'T
+ + The input item. +
+'T[]
+ + The result array of one item. +
++
Array.singleton 7
+
+[| 7 |]
.
+
+
+
+
+
+
+ Array.skip count array
+
+
+
+
+ Array.skip count array
+ int
+ -
+ The number of elements to skip. If negative the full array will be returned as a copy.
+
+ 'T[]
+ -
+ The input array.
+
+ 'T[]
+
+ A copy of the input array, after removing the first N elements.
+ + Builds a new array that contains the elements of the given array, excluding the first N elements. +
+int
+ + The number of elements to skip. If negative the full array will be returned as a copy. +
+'T[]
+ + The input array. +
+'T[]
+ + A copy of the input array, after removing the first N elements. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ + ArgumentException + + | ++ Thrown when count exceeds the number of + elements in the array. + | +
+
let inputs = [| "a"; "b"; "c"; "d" |]
+
+ inputs |> Array.skip 2
+
+[| "c"; "d" |]
+
+ +
let inputs = [| "a"; "b"; "c"; "d" |]
+
+ inputs |> Array.skip 5
+
+ArgumentException
.
+
+
+ +
let inputs = [| "a"; "b"; "c"; "d" |]
+
+ inputs |> Array.skip -1
+
+[| "a"; "b"; "c"; "d" |]
.
+
+
+
+
+
+ Array.skipWhile predicate array
+ 'T -> bool
+ -
+ A function that evaluates an element of the array to a boolean value.
+
+ 'T[]
+ -
+ The input array.
+
+ 'T[]
+
+ The created sub array.
+ + Bypasses elements in an array while the given predicate returns True, and then returns + the remaining elements in a new array. +
+'T -> bool
+ + A function that evaluates an element of the array to a boolean value. +
+'T[]
+ + The input array. +
+'T[]
+ + The created sub array. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let inputs = [| "a"; "bbb"; "cc"; "d" |]
+
+ inputs |> Array.skipWhile (fun x -> x.Length < 3)
+
+[|"bbb"; "cc"; "d"|]
+
+
+
+
+
+ Array.sort array
+
+
+
+
+ Array.sort array
+ 'T[]
+ -
+ The input array.
+
+ 'T[]
+
+ The sorted array.
+ + Sorts the elements of an array, returning a new array. Elements are compared using Operators.compare. +
++ This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. + For a stable sort, consider using Seq.Sort. +
+'T[]
+ + The input array. +
+'T[]
+ + The sorted array. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let input = [| 8; 4; 3; 1; 6; 1 |]
+
+ Array.sort input
+
+[| 1; 1; 3; 4; 6; 8 |]
.
+
+
+
+
+
+ Array.sortBy projection array
+ 'T -> 'Key
+ -
+ The function to transform array elements into the type that is compared.
+
+ 'T[]
+ -
+ The input array.
+
+ 'T[]
+
+ The sorted array.
+ + Sorts the elements of an array, using the given projection for the keys and returning a new array. + Elements are compared using Operators.compare. +
++ This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. + For a stable sort, consider using Seq.Sort. +
+'T -> 'Key
+ + The function to transform array elements into the type that is compared. +
+'T[]
+ + The input array. +
+'T[]
+ + The sorted array. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let input = [| "a"; "bbb"; "cccc"; "dd" |]
+
+ input |> Array.sortBy (fun s -> s.Length)
+
+[|"a"; "dd"; "bbb"; "cccc"|]
.
+
+
+
+
+
+ Array.sortByDescending projection array
+ 'T -> 'Key
+ -
+ The function to transform array elements into the type that is compared.
+
+ 'T[]
+ -
+ The input array.
+
+ 'T[]
+
+ The sorted array.
+ + Sorts the elements of an array, in descending order, using the given projection for the keys and returning a new array. + Elements are compared using Operators.compare. +
++ This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. + For a stable sort, consider using Seq.Sort. +
+'T -> 'Key
+ + The function to transform array elements into the type that is compared. +
+'T[]
+ + The input array. +
+'T[]
+ + The sorted array. +
++
let input = [| "a"; "bbb"; "cccc"; "dd" |]
+
+ input |> Array.sortByDescending (fun s -> s.Length)
+
+[|"cccc"; "bbb"; "dd"; "a"|]
.
+
+
+
+
+
+ Array.sortDescending array
+ 'T[]
+ -
+ The input array.
+
+ 'T[]
+
+ The sorted array.
+ + Sorts the elements of an array, in descending order, returning a new array. Elements are compared using Operators.compare. +
++ This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. + For a stable sort, consider using Seq.Sort. +
+'T[]
+ + The input array. +
+'T[]
+ + The sorted array. +
++
let input = [| 8; 4; 3; 1; 6; 1 |]
+
+ input |> Array.sortDescending
+
+[| 8; 6; 4; 3; 1; 1 |]
.
+
+
+
+
+
+
+ Array.sortInPlace array
+
+
+
+
+ Array.sortInPlace array
+ 'T[]
+ -
+ The input array.
+
+ + Sorts the elements of an array by mutating the array in-place, using the given comparison function. + Elements are compared using Operators.compare. +
+'T[]
+ + The input array. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let array = [| 8; 4; 3; 1; 6; 1 |]
+
+ Array.sortInPlace array
+
+array
contains [| 1; 1; 3; 4; 6; 8 |]
.
+
+
+
+
+
+ Array.sortInPlaceBy projection array
+ 'T -> 'Key
+ -
+ The function to transform array elements into the type that is compared.
+
+ 'T[]
+ -
+ The input array.
+
+ + Sorts the elements of an array by mutating the array in-place, using the given projection for the keys. + Elements are compared using Operators.compare. +
++ This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. + For a stable sort, consider using Seq.Sort. +
+'T -> 'Key
+ + The function to transform array elements into the type that is compared. +
+'T[]
+ + The input array. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let array = [| "a"; "bbb"; "cccc"; "dd" |]
+
+ array |> Array.sortInPlaceBy (fun s -> s.Length)
+
+array
contains [|"a"; "dd"; "bbb"; "cccc"|]
.
+
+
+
+
+
+ Array.sortInPlaceWith comparer array
+ 'T -> 'T -> int
+ -
+ The function to compare pairs of array elements.
+
+ 'T[]
+ -
+ The input array.
+
+ + Sorts the elements of an array by mutating the array in-place, using the given comparison function as the order. +
+'T -> 'T -> int
+ + The function to compare pairs of array elements. +
+'T[]
+ + The input array. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ The following sorts entries using a comparison function that compares string lengths then index numbers: +
let compareEntries (n1: int, s1: string) (n2: int, s2: string) =
+ let c = compare s1.Length s2.Length
+ if c <> 0 then c else
+ compare n1 n2
+
+ let array = [| (0,"aa"); (1,"bbb"); (2,"cc"); (3,"dd") |]
+
+ array |> Array.sortInPlaceWith compareEntries
+
+array
contains [|(0, "aa"); (2, "cc"); (3, "dd"); (1, "bbb")|]
.
+
+
+
+
+
+ Array.sortWith comparer array
+ 'T -> 'T -> int
+ -
+ The function to compare pairs of array elements.
+
+ 'T[]
+ -
+ The input array.
+
+ 'T[]
+
+ The sorted array.
+ + Sorts the elements of an array, using the given comparison function as the order, returning a new array. +
++ This is not a stable sort, i.e. the original order of equal elements is not necessarily preserved. + For a stable sort, consider using Seq.Sort. +
+'T -> 'T -> int
+ + The function to compare pairs of array elements. +
+'T[]
+ + The input array. +
+'T[]
+ + The sorted array. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ Sort an array of pairs using a comparison function that compares string lengths then index numbers: +
let compareEntries (n1: int, s1: string) (n2: int, s2: string) =
+ let c = compare s1.Length s2.Length
+ if c <> 0 then c else
+ compare n1 n2
+
+ let input = [| (0,"aa"); (1,"bbb"); (2,"cc"); (3,"dd") |]
+
+ input |> Array.sortWith compareEntries
+
+[|(0, "aa"); (2, "cc"); (3, "dd"); (1, "bbb")|]
.
+
+
+
+
+
+ Array.splitAt index array
+ int
+ -
+ The index at which the array is split.
+
+ 'T[]
+ -
+ The input array.
+
+ 'T[] * 'T[]
+
+ The two split arrays.
+ int
+ + The index at which the array is split. +
+'T[]
+ + The input array. +
+'T[] * 'T[]
+ + The two split arrays. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ + InvalidOperationException + + | ++ Thrown when split index exceeds the number of elements + in the array. + | +
+
let input = [| 8; 4; 3; 1; 6; 1 |]
+
+ let front, back = input |> Array.splitAt 3
+
+front
to [|8; 4; 3|]
and back
to [|1; 6; 1|]
.
+
+
+
+
+
+ Array.splitInto count array
+ int
+ -
+ The maximum number of chunks.
+
+ 'T[]
+ -
+ The input array.
+
+ 'T[][]
+
+ The array split into chunks.
+ int
+ + The maximum number of chunks. +
+'T[]
+ + The input array. +
+'T[][]
+ + The array split into chunks. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ + ArgumentException + + | +
+ Thrown when count is not positive.
+ |
+
+
let inputs = [| 1; 2; 3; 4; 5 |]
+
+ inputs |> Array.splitInto 3
+
+seq [| [|1; 2|]; [|3; 4|]; [|5|] |]
+
+ +
let inputs = [| 1; 2; 3; 4; 5 |]
+
+ inputs |> Array.splitInto -1
+
+ArgumentException
+
+
+
+
+ Array.sub array startIndex count
+ 'T[]
+ -
+ The input array.
+
+ int
+ -
+ The index of the first element of the sub array.
+
+ int
+ -
+ The length of the sub array.
+
+ 'T[]
+
+ The created sub array.
+ + Builds a new array that contains the given subrange specified by + starting index and length. +
++ + Slicing syntax is generally preferred, e.g. +
let input = [| 0; 1; 2; 3; 4; 5 |]
+
+ input.[2..4]
+
+'T[]
+ + The input array. +
+int
+ + The index of the first element of the sub array. +
+int
+ + The length of the sub array. +
+'T[]
+ + The created sub array. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ + ArgumentException + + | ++ Thrown when either startIndex or count is negative, + or when there aren't enough elements in the input array. + | +
+
let input = [| 0; 1; 2; 3; 4; 5 |]
+
+ Array.sub input 2 3
+
+[| 2; 3; 4 |]
.
+
+
+
+
+
+
+ Array.sum array
+
+
+
+
+ Array.sum array
+ ^T[]
+ -
+ The input array.
+
+ ^T
+
+ The resulting sum.
+ ^T[]
+ + The input array. +
+^T
+ + The resulting sum. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let input = [| 1; 5; 3; 2 |]
+
+ input |> Array.sum
+
+11
.
+
+
+
+
+
+ Array.sumBy projection array
+ 'T -> ^U
+ -
+ The function to transform the array elements into the type to be summed.
+
+ 'T[]
+ -
+ The input array.
+
+ ^U
+
+ The resulting sum.
+ + Returns the sum of the results generated by applying the function to each element of the array. +
+'T -> ^U
+ + The function to transform the array elements into the type to be summed. +
+'T[]
+ + The input array. +
+^U
+ + The resulting sum. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let input = [| "aa"; "bbb"; "cc" |]
+
+ input |> Array.sumBy (fun s -> s.Length)
+
+7
.
+
+
+
+
+
+
+ Array.tail array
+
+
+
+
+ Array.tail array
+ 'T[]
+ -
+ The input array.
+
+ 'T[]
+
+ A new array containing the elements of the original except the first element.
+ + Returns a new array containing the elements of the original except the first element. +
+'T[]
+ + The input array. +
+'T[]
+ + A new array containing the elements of the original except the first element. +
++ + ArgumentException + + | ++ Thrown when the array is empty. + | +
+ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let inputs = [| "a"; "bb"; "ccc" |]
+
+ inputs |> Array.tail
+
+[| "bb"; "ccc" |]
+
+
+
+
+
+ Array.take count array
+
+
+
+
+ Array.take count array
+ int
+ -
+ The number of items to take.
+
+ 'T[]
+ -
+ The input array.
+
+ 'T[]
+
+ The result array.
+
+ Throws InvalidOperationException
+ if the count exceeds the number of elements in the array. Array.truncate
+ returns as many items as the array contains instead of throwing an exception.
+
int
+ + The number of items to take. +
+'T[]
+ + The input array. +
+'T[]
+ + The result array. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ + ArgumentException + + | ++ Thrown when the input array is empty. + | +
+ + InvalidOperationException + + | ++ Thrown when count exceeds the number of elements + in the list. + | +
+
let inputs = [| "a"; "b"; "c"; "d" |]
+
+ inputs |> Array.take 2
+
+[| "a"; "b" |]
+
+ +
let inputs = [| "a"; "b"; "c"; "d" |]
+
+ inputs |> Array.take 6
+
+InvalidOperationException
.
+
+
+ +
let inputs = [| "a"; "b"; "c"; "d" |]
+
+ inputs |> Array.take 0
+
+[| |]
.
+
+
+
+
+
+ Array.takeWhile predicate array
+ 'T -> bool
+ -
+ A function that evaluates to false when no more items should be returned.
+
+ 'T[]
+ -
+ The input array.
+
+ 'T[]
+
+ The result array.
+ + Returns an array that contains all elements of the original array while the + given predicate returns True, and then returns no further elements. +
+'T -> bool
+ + A function that evaluates to false when no more items should be returned. +
+'T[]
+ + The input array. +
+'T[]
+ + The result array. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let inputs = [| "a"; "bb"; "ccc"; "d" |]
+
+ inputs |> Array.takeWhile (fun x -> x.Length < 3)
+
+[| "a"; "bb" |]
+
+
+
+
+
+ Array.toList array
+
+
+
+
+ Array.toList array
+ 'T[]
+ -
+ The input array.
+
+ 'T list
+
+ The list of array elements.
+ 'T[]
+ + The input array. +
+'T list
+ + The list of array elements. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let inputs = [| 1; 2; 5 |]
+
+ inputs |> Array.toList
+
+[ 1; 2; 5 ]
.
+
+
+
+
+
+
+ Array.toSeq array
+
+
+
+
+ Array.toSeq array
+ 'T[]
+ -
+ The input array.
+
+ 'T seq
+
+ The sequence of array elements.
+ 'T[]
+ + The input array. +
+'T seq
+ + The sequence of array elements. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let inputs = [| 1; 2; 5 |]
+
+ inputs |> Array.toSeq
+
+seq { 1; 2; 5 }
.
+
+
+
+
+
+
+ Array.transpose arrays
+
+
+
+
+ Array.transpose arrays
+ 'T[] seq
+ -
+ The input sequence of arrays.
+
+ 'T[][]
+
+ The transposed array.
+ 'T[] seq
+ + The input sequence of arrays. +
+'T[][]
+ + The transposed array. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+ + ArgumentException + + | ++ Thrown when the input arrays differ in length. + | +
+
let inputs =
+ [| [| 10; 20; 30 |]
+ [| 11; 21; 31 |] |]
+
+ inputs |> Array.transpose
+
+[|[|10; 11|]; [|20; 21|]; [|30; 31|]|]
.
+
+
+
+
+
+ Array.truncate count array
+ int
+ -
+ The maximum number of items to return.
+
+ 'T[]
+ -
+ The input array.
+
+ 'T[]
+
+ The result array.
+ int
+ + The maximum number of items to return. +
+'T[]
+ + The input array. +
+'T[]
+ + The result array. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let inputs = [| "a"; "b"; "c"; "d" |]
+
+ inputs |> Array.truncate 2
+
+[| "a"; "b" |]
+
+ +
let inputs = [| "a"; "b"; "c"; "d" |]
+
+ inputs |> Array.truncate 6
+
+[| "a"; "b"; "c"; "d" |]
+
+ +
let inputs = [| "a"; "b"; "c"; "d" |]
+
+ inputs |> Array.truncate 0
+
+[| |]
.
+
+
+
+
+
+ Array.tryExactlyOne array
+ 'T[]
+ -
+ The input array.
+
+ 'T option
+
+ The only element of the array or None.
+
+ Returns the only element of the array or None
if array is empty or contains more than one element.
+
'T[]
+ + The input array. +
+'T option
+ + The only element of the array or None. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let inputs = [| "banana" |]
+
+ inputs |> Array.tryExactlyOne
+
+Some banana
+
+ +
let inputs = [| "pear"; "banana" |]
+
+ inputs |> Array.tryExactlyOne
+
+None
+
+ +
let inputs: int[] = [| |]
+
+ inputs |> Array.tryExactlyOne
+
+None
+
+
+
+
+ + Returns the first element for which the given function returns True. + Return None if no such element exists. +
+'T -> bool
+ + The function to test the input elements. +
+'T[]
+ + The input array. +
+'T option
+ + The first element that satisfies the predicate, or None. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ Try to find the first even number: +
let inputs = [| 1; 2; 3 |]
+
+ inputs |> Array.tryFind (fun elm -> elm % 2 = 0)
+
+Some 2
+
+ + Try to find the first even number: +
let inputs = [| 1; 5; 3 |]
+
+ inputs |> Array.tryFind (fun elm -> elm % 2 = 0)
+
+None
+
+
+
+
+ Array.tryFindBack predicate array
+ 'T -> bool
+ -
+ The function to test the input elements.
+
+ 'T[]
+ -
+ The input array.
+
+ 'T option
+
+ The last element that satisfies the predicate, or None.
+ + Returns the last element for which the given function returns True. + Return None if no such element exists. +
+'T -> bool
+ + The function to test the input elements. +
+'T[]
+ + The input array. +
+'T option
+ + The last element that satisfies the predicate, or None. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ Try to find the first even number from the back: +
let inputs = [| 1; 2; 3; 4; 5 |]
+
+ inputs |> Array.tryFindBack (fun elm -> elm % 2 = 0)
+
+Some 4
+
+ + Try to find the first even number from the back: +
let inputs = [| 1; 5; 3 |]
+
+ inputs |> Array.tryFindBack (fun elm -> elm % 2 = 0)
+
+None
+
+
+
+
+ Array.tryFindIndex predicate array
+ 'T -> bool
+ -
+ The function to test the input elements.
+
+ 'T[]
+ -
+ The input array.
+
+ int option
+
+ The index of the first element that satisfies the predicate, or None.
+ + Returns the index of the first element in the array + that satisfies the given predicate. +
+'T -> bool
+ + The function to test the input elements. +
+'T[]
+ + The input array. +
+int option
+ + The index of the first element that satisfies the predicate, or None. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ Try to find the index of the first even number: +
let inputs = [| 1; 2; 3; 4; 5 |]
+
+ inputs |> Array.tryFindIndex (fun elm -> elm % 2 = 0)
+
+Some 1
+
+ + Try to find the index of the first even number: +
let inputs = [| 1; 3; 5; 7 |]
+
+ inputs |> Array.tryFindIndex (fun elm -> elm % 2 = 0)
+
+None
+
+
+
+
+ Array.tryFindIndexBack predicate array
+ 'T -> bool
+ -
+ The function to test the input elements.
+
+ 'T[]
+ -
+ The input array.
+
+ int option
+
+ The index of the last element that satisfies the predicate, or None.
+ + Returns the index of the last element in the array + that satisfies the given predicate. +
+'T -> bool
+ + The function to test the input elements. +
+'T[]
+ + The input array. +
+int option
+ + The index of the last element that satisfies the predicate, or None. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ Try to find the index of the first even number from the back: +
let inputs = [| 1; 2; 3; 4; 5 |]
+
+ inputs |> Array.tryFindIndexBack (fun elm -> elm % 2 = 0)
+
+Some 3
+
+ + Try to find the index of the first even number from the back: +
let inputs = [| 1; 3; 5; 7 |]
+
+ inputs |> Array.tryFindIndexBack (fun elm -> elm % 2 = 0)
+
+None
+
+
+
+
+
+ Array.tryHead array
+
+
+
+
+ Array.tryHead array
+ 'T[]
+ -
+ The input array.
+
+ 'T option
+
+ The first element of the array or None.
+
+ Returns the first element of the array, or
+ None
if the array is empty.
+
'T[]
+ + The input array. +
+'T option
+ + The first element of the array or None. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let inputs = [| "banana"; "pear" |]
+
+ inputs |> Array.tryHead
+
+Some "banana"
+
+ +
let inputs : int[] = [| |]
+
+ inputs |> Array.tryHead
+
+None
+
+
+
+
+
+
+ Tries to find the nth element in the array.
+ Returns None
if index is negative or the input array does not contain enough elements.
+
int
+ + The index of element to retrieve. +
+'T[]
+ + The input array. +
+'T option
+
+ The nth element of the array or None
.
+
+ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let inputs = [| "a"; "b"; "c" |]
+
+ inputs |> Array.tryItem 1
+
+Some "b"
.
+
+
+ +
let inputs = [| "a"; "b"; "c" |]
+
+ inputs |> Array.tryItem 4
+
+None
.
+
+
+
+
+
+
+ Array.tryLast array
+
+
+
+
+ Array.tryLast array
+ 'T[]
+ -
+ The input array.
+
+ 'T option
+
+ The last element of the array or None.
+
+ Returns the last element of the array.
+ Return None
if no such element exists.
+
'T[]
+ + The input array. +
+'T option
+ + The last element of the array or None. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
[| "pear"; "banana" |] |> Array.tryLast
+
+Some "banana"
+
+ +
[| |] |> Array.tryLast
+
+None
+
+
+
+
+ Array.tryPick chooser array
+ 'T -> 'U option
+ -
+ The function to transform the array elements into options.
+
+ 'T[]
+ -
+ The input array.
+
+ 'U option
+
+ The first transformed element that is Some(x)
.
+
+ Applies the given function to successive elements, returning the first
+ result where the function returns Some(x)
for some x
. If the function
+ never returns Some(x)
then None
is returned.
+
'T -> 'U option
+ + The function to transform the array elements into options. +
+'T[]
+ + The input array. +
+'U option
+
+ The first transformed element that is Some(x)
.
+
+ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let input = [| 1; 2; 3 |]
+
+ input |> Array.tryPick (fun n -> if n % 2 = 0 then Some (string n) else None)
+
+Some "2"
.
+
+
+ +
let input = [| 1; 2; 3 |]
+
+ input |> Array.tryPick (fun n -> if n > 3 = 0 then Some (string n) else None)
+
+None
.
+
+
+
+
+
+ Array.unfold generator state
+ 'State -> ('T * 'State) option
+ -
+ A function that takes in the current state and returns an option tuple of the next
+ element of the array and the next state value.
+
+ 'State
+ -
+ The initial state value.
+
+ 'T[]
+
+ The result array.
+
+ Returns an array that contains the elements generated by the given computation.
+ The generator is repeatedly called to build the list until it returns `None`.
+ The given initial state
argument is passed to the element generator.
+
'State -> ('T * 'State) option
+ + A function that takes in the current state and returns an option tuple of the next + element of the array and the next state value. +
+'State
+ + The initial state value. +
+'T[]
+ + The result array. +
++
1 |> Array.unfold (fun state -> if state > 100 then None else Some (state, state * 2))
+
+[| 1; 2; 4; 8; 16; 32; 64 |]
+
+
+
+
+
+ Array.unzip array
+
+
+
+
+ Array.unzip array
+ ('T1 * 'T2)[]
+ -
+ The input array.
+
+ 'T1[] * 'T2[]
+
+ The two arrays.
+ ('T1 * 'T2)[]
+ + The input array. +
+'T1[] * 'T2[]
+ + The two arrays. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let inputs = [| (1, "one"); (2, "two") |]
+
+ let numbers, names = inputs |> Array.unzip
+
+numbers
to [|1; 2|]
and names
to [|"one"; "two"|]
.
+
+
+
+
+
+
+ Array.unzip3 array
+
+
+
+
+ Array.unzip3 array
+ ('T1 * 'T2 * 'T3)[]
+ -
+ The input array.
+
+ 'T1[] * 'T2[] * 'T3[]
+
+ The tuple of three arrays.
+ ('T1 * 'T2 * 'T3)[]
+ + The input array. +
+'T1[] * 'T2[] * 'T3[]
+ + The tuple of three arrays. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+
let inputs = [| (1, "one", "I"); (2, "two", "II") |]
+
+ let numbers, names, roman = inputs |> Array.unzip3
+
+numbers
to [|1; 2|]
, names
to [|"one"; "two"|]
and roman
to [|"I"; "II"|]
.
+
+
+
+
+
+ Array.updateAt index value source
+ int
+ -
+ The index of the item to be replaced.
+
+ 'T
+ -
+ The new value.
+
+ 'T[]
+ -
+ The input array.
+
+ 'T[]
+
+ The result array.
+ + Return a new array with the item at a given index set to the new value. +
+int
+ + The index of the item to be replaced. +
+'T
+ + The new value. +
+'T[]
+ + The input array. +
+'T[]
+ + The result array. +
++ + ArgumentException + + | ++ Thrown when index is outside 0..source.Length - 1 + | +
+
let inputs = [| 0; 1; 2 |]
+
+ inputs |> Array.updateAt 1 9
+
+[| 0; 9; 2 |]
.
+
+
+
+
+
+ Array.where predicate array
+ 'T -> bool
+ -
+ The function to test the input elements.
+
+ 'T[]
+ -
+ The input array.
+
+ 'T[]
+
+ An array containing the elements for which the given predicate returns true.
+ + Returns a new array containing only the elements of the array + for which the given predicate returns "true". +
+
+ This is identical to Array.filter
.
+
'T -> bool
+ + The function to test the input elements. +
+'T[]
+ + The input array. +
+'T[]
+ + An array containing the elements for which the given predicate returns true. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ Select only the even numbers: +
let inputs = [| 1; 2; 3; 4 |]
+
+ inputs |> Array.where (fun elm -> elm % 2 = 0)
+
+[| 2; 4 |]
+
+
+
+
+ Array.windowed windowSize array
+ int
+ -
+ The number of elements in each window.
+
+ 'T[]
+ -
+ The input array.
+
+ 'T[][]
+
+ The result array.
+ + Returns an array of sliding windows containing elements drawn from the input + array. Each window is returned as a fresh array. +
+int
+ + The number of elements in each window. +
+'T[]
+ + The input array. +
+'T[][]
+ + The result array. +
++ + ArgumentNullException + + | ++ Thrown when the input array is null. + | +
+ + ArgumentException + + | ++ Thrown when windowSize is not positive. + | +
+
let inputs = [| 1; 2; 3; 4; 5 |]
+
+ inputs |> Array.windowed 3
+
+[|[|1; 2; 3|]; [|2; 3; 4|]; [|3; 4; 5|]|]
+
+
+
+
+
+ Array.zeroCreate count
+
+
+
+
+ Array.zeroCreate count
+ int
+ -
+ The length of the array to create.
+
+ 'T[]
+
+ The created array.
+ + Creates an array where the entries are initially the default value Unchecked.defaultof<'T>. +
+int
+ + The length of the array to create. +
+'T[]
+ + The created array. +
++ + ArgumentException + + | ++ Thrown when count is negative. + | +
+
let arr : int[] = Array.zeroCreate 4
+
+[| 0; 0; 0; 0 |]
+
+
+
+
+
+ Array.zip array1 array2
+
+
+
+
+ Array.zip array1 array2
+ 'T1[]
+ -
+ The first input array.
+
+ 'T2[]
+ -
+ The second input array.
+
+ ('T1 * 'T2)[]
+
+ The array of tupled elements.
+
+ Combines the two arrays into an array of pairs. The two arrays must have equal lengths, otherwise an ArgumentException
is
+ raised.
+
'T1[]
+ + The first input array. +
+'T2[]
+ + The second input array. +
+('T1 * 'T2)[]
+ + The array of tupled elements. +
++ + ArgumentNullException + + | ++ Thrown when either of the input arrays is null. + | +
+ + ArgumentException + + | ++ Thrown when the input arrays differ in length. + | +
+
let numbers = [|1; 2|]
+ let names = [|"one"; "two"|]
+
+ Array.zip numbers names
+
+[| (1, "one"); (2, "two") |]
.
+
+
+
+
+
+ Array.zip3 array1 array2 array3
+ 'T1[]
+ -
+ The first input array.
+
+ 'T2[]
+ -
+ The second input array.
+
+ 'T3[]
+ -
+ The third input array.
+
+ ('T1 * 'T2 * 'T3)[]
+
+ The array of tupled elements.
+
+ Combines three arrays into an array of pairs. The three arrays must have equal lengths, otherwise an ArgumentException
is
+ raised.
+
'T1[]
+ + The first input array. +
+'T2[]
+ + The second input array. +
+'T3[]
+ + The third input array. +
+('T1 * 'T2 * 'T3)[]
+ + The array of tupled elements. +
++ + ArgumentNullException + + | ++ Thrown when any of the input arrays are null. + | +
+ + ArgumentException + + | ++ Thrown when the input arrays differ in length. + | +
+
let numbers = [| 1; 2 |]
+ let names = [| "one"; "two" |]
+ let roman = [| "I"; "II" |]
+
+ Array.zip3 numbers names roman
+
+[|(1, "one", "I"); (2, "two", "II")|]
.
+
+
+ + Common notions of value ordering implementing the IComparer + interface, for constructing sorted data structures and performing sorting operations. +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Get an implementation of comparison semantics using the given function. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ NonStructural
+ + + + Returns: + IComparer<^T>
+
+ An object implementing IComparer using NonStructuralComparison.Compare.
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Get an implementation of comparison semantics using non-structural comparison. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Structural
+ + + + Returns: + IComparer<'T>
+
+ An object implementing IComparer using Operators.compare.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Get an implementation of comparison semantics using structural comparison. + + |
+
+ Immutable maps based on binary trees, where keys are ordered by F# generic comparison. By default + comparison is the F# structural comparison function or uses implementations of the IComparable interface on key values. +
++ See the Map module for further operations on maps. + + All members of this class are thread-safe and may be used concurrently from multiple threads. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+Multiple items
+
+
+
+ module Map + +from Microsoft.FSharp.Collections -------------------- type Map<'Key,'Value (requires comparison)> = + interface IReadOnlyDictionary<'Key,'Value> + interface IReadOnlyCollection<KeyValuePair<'Key,'Value>> + interface IEnumerable + interface IStructuralEquatable + interface IComparable + interface IEnumerable<KeyValuePair<'Key,'Value>> + interface ICollection<KeyValuePair<'Key,'Value>> + interface IDictionary<'Key,'Value> + new: elements: ('Key * 'Value) seq -> Map<'Key,'Value> + member Add: key: 'Key * value: 'Value -> Map<'Key,'Value> + ... -------------------- new: elements: ('Key * 'Value) seq -> Map<'Key,'Value> |
+
+ Instance member + | ++ Description + | +||
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Add
+ + + Parameters: +
'Key
+ -
+ The key to add.
+
+ + + + value + + : + 'Value
+ -
+ The value to add.
+
+ + + + Returns: + Map<'Key, 'Value>
+
+ The resulting map.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns a new map with the binding added to the given map. + If a binding with the given key already exists in the input map, the existing binding is replaced by the new binding in the result map. + + |
+ ||
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns a new map with the value stored under key changed according to f. + + |
+ ||
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.ContainsKey
+ + + Parameters: +
'Key
+ -
+ The input key.
+
+ + + + Returns: + bool
+
+ True if the map contains the given key.
+ + |
+
+
+
+ + ++
+ Example +++
+val sample: Map<int,string>
+Multiple items
+module Map + +from Microsoft.FSharp.Collections -------------------- type Map<'Key,'Value (requires comparison)> = + interface IReadOnlyDictionary<'Key,'Value> + interface IReadOnlyCollection<KeyValuePair<'Key,'Value>> + interface IEnumerable + interface IStructuralEquatable + interface IComparable + interface IEnumerable<KeyValuePair<'Key,'Value>> + interface ICollection<KeyValuePair<'Key,'Value>> + interface IDictionary<'Key,'Value> + new: elements: ('Key * 'Value) seq -> Map<'Key,'Value> + member Add: key: 'Key * value: 'Value -> Map<'Key,'Value> + ... -------------------- new: elements: ('Key * 'Value) seq -> Map<'Key,'Value> member Map.ContainsKey: key: 'Key -> bool
+
+
+
+ |
+ ||
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+val sample: Map<int,string>
+Multiple items
+module Map + +from Microsoft.FSharp.Collections -------------------- type Map<'Key,'Value (requires comparison)> = + interface IReadOnlyDictionary<'Key,'Value> + interface IReadOnlyCollection<KeyValuePair<'Key,'Value>> + interface IEnumerable + interface IStructuralEquatable + interface IComparable + interface IEnumerable<KeyValuePair<'Key,'Value>> + interface ICollection<KeyValuePair<'Key,'Value>> + interface IDictionary<'Key,'Value> + new: elements: ('Key * 'Value) seq -> Map<'Key,'Value> + member Add: key: 'Key * value: 'Value -> Map<'Key,'Value> + ... -------------------- new: elements: ('Key * 'Value) seq -> Map<'Key,'Value> property Map.Count: int with get
+
+
+
+ |
+ ||
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+val emptyMap: Map<int,string>
+Multiple items
+module Map + +from Microsoft.FSharp.Collections -------------------- type Map<'Key,'Value (requires comparison)> = + interface IReadOnlyDictionary<'Key,'Value> + interface IReadOnlyCollection<KeyValuePair<'Key,'Value>> + interface IEnumerable + interface IStructuralEquatable + interface IComparable + interface IEnumerable<KeyValuePair<'Key,'Value>> + interface ICollection<KeyValuePair<'Key,'Value>> + interface IDictionary<'Key,'Value> + new: elements: ('Key * 'Value) seq -> Map<'Key,'Value> + member Add: key: 'Key * value: 'Value -> Map<'Key,'Value> + ... -------------------- new: elements: ('Key * 'Value) seq -> Map<'Key,'Value> Multiple items
+val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = + int Multiple items
+val string: value: 'T -> string -------------------- type string = System.String val empty<'Key,'T (requires comparison)> : Map<'Key,'T> (requires comparison)
+property Map.IsEmpty: bool with get
+val notEmptyMap: Map<int,string>
+
+
+
+ |
+ ||
+
+
+
+
+
+
+
+ Full Usage:
+
+ this[key]
+ + + Parameters: +
'Key
+ -
+ The input key.
+
+ + + + Returns: + 'Value
+
+ The value mapped to the key.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Lookup an element in the map. Raise |
+
+ + KeyNotFoundException + + | ++ Thrown when the key is not found. + | +
+
let sample = Map [ (1, "a"); (2, "b") ]
+
+ sample.[1] // evaluates to "a"
+ sample.[3] // throws KeyNotFoundException
+
+
+
+
+
+ this.Keys
+
+
+
+
+ + The keys in the map. + The sequence will be ordered by the keys of the map. +
+ICollection<'Key>
+ +
let sample = Map [ (1, "a"); (2, "b") ]
+
+ sample.Keys // evaluates to seq [1; 2]
+
+
+
+
+
+ this.Remove
+
+
+
+
+ this.Remove
+ 'Key
+ -
+ The input key.
+
+ Map<'Key, 'Value>
+
+ The resulting map.
+ + Removes an element from the domain of the map. No exception is raised if the element is not present. +
+'Key
+ + The input key. +
+Map<'Key, 'Value>
+ + The resulting map. +
++
let sample = Map [ (1, "a"); (2, "b") ]
+
+ sample.Remove 1 // evaluates to map [(2, "b")]
+ sample.Remove 3 // equal to sample
+
+
+
+
+
+ this.TryFind
+
+
+
+
+ this.TryFind
+ 'Key
+ -
+ The input key.
+
+ 'Value option
+
+ The mapped value, or None if the key is not in the map.
+
+ Lookup an element in the map, returning a Some
value if the element is in the domain
+ of the map and None
if not.
+
'Key
+ + The input key. +
+'Value option
+ + The mapped value, or None if the key is not in the map. +
++
let sample = Map [ (1, "a"); (2, "b") ]
+
+ sample.TryFind 1 // evaluates to Some "a"
+ sample.TryFind 3 // evaluates to None
+
+
+
+
+
+ this.TryGetValue
+
+
+
+
+
+
+ Lookup an element in the map, assigning to value
if the element is in the domain
+ of the map and returning false
if not.
+
'Key
+ + The input key. +
+byref<'Value>
+ + A reference to the output value. +
+bool
+
+ true
if the value is present, false
if not.
+
+
let sample = Map [ (1, "a"); (2, "b") ]
+
+ sample.TryGetValue 1 // evaluates to (true, "a")
+ sample.TryGetValue 3 // evaluates to (false, null)
+
+ let mutable x = ""
+ sample.TryGetValue (1, &x) // evaluates to true, x set to "a"
+
+ let mutable y = ""
+ sample.TryGetValue (3, &y) // evaluates to false, y unchanged
+
+
+
+
+
+ this.Values
+
+
+
+
+ + All the values in the map, including the duplicates. + The sequence will be ordered by the keys of the map. +
+ICollection<'Value>
+ +
let sample = Map [ (1, "a"); (2, "b") ]
+
+ sample.Values // evaluates to seq ["a"; "b"]
+
++ Immutable sets based on binary trees, where elements are ordered by F# generic comparison. By default + comparison is the F# structural comparison function or uses implementations of the IComparable interface on element values. +
++ See the Set module for further operations on sets. + + All members of this class are thread-safe and may be used concurrently from multiple threads. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+val sequenceOfNumbers: int seq
+Multiple items
+val seq: sequence: 'T seq -> 'T seq -------------------- type 'T seq = System.Collections.Generic.IEnumerable<'T> val numbersInSet: Set<int>
+Multiple items
+module Set + +from Microsoft.FSharp.Collections -------------------- type Set<'T (requires comparison)> = + interface IReadOnlyCollection<'T> + interface IStructuralEquatable + interface IComparable + interface IEnumerable + interface IEnumerable<'T> + interface ICollection<'T> + new: elements: 'T seq -> Set<'T> + member Add: value: 'T -> Set<'T> + member Contains: value: 'T -> bool + override Equals: obj -> bool + ... -------------------- new: elements: 'T seq -> Set<'T> val printfn: format: Printf.TextWriterFormat<'T> -> 'T
+
+
+
+ |
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Add
+ + + Parameters: +
'T
+ -
+ The value to add to the set.
+
+ + + + Returns: + Set<'T>
+
+ The result set.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A useful shortcut for Set.add. Note this operation produces a new set + and does not mutate the original set. The new set will share many storage + nodes with the original. See the Set module for further operations on sets. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Contains
+ + + Parameters: +
'T
+ -
+ The value to check.
+
+ + + + Returns: + bool
+
+ True if the set contains value .
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A useful shortcut for Set.contains. See the Set module for further operations on sets. + + |
+
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+val set: Set<int>
+Multiple items
+module Set + +from Microsoft.FSharp.Collections -------------------- type Set<'T (requires comparison)> = + interface IReadOnlyCollection<'T> + interface IStructuralEquatable + interface IComparable + interface IEnumerable + interface IEnumerable<'T> + interface ICollection<'T> + new: elements: 'T seq -> Set<'T> + member Add: value: 'T -> Set<'T> + member Contains: value: 'T -> bool + override Equals: obj -> bool + ... -------------------- new: elements: 'T seq -> Set<'T> val empty<'T (requires comparison)> : Set<'T> (requires comparison)
+val printfn: format: Printf.TextWriterFormat<'T> -> 'T
+property Set.Count: int with get
+
+
+ The sample evaluates to the following output: The set has 3 elements
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A useful shortcut for Set.isEmpty. See the Set module for further operations on sets. + + |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Evaluates to "true" if all elements of the first set are in the second, and at least + one element of the second is not in the first. + + |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Evaluates to "true" if all elements of the second set are in the first, and at least + one element of the first is not in the second. + + |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Evaluates to "true" if all elements of the first set are in the second. + + |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Evaluates to "true" if all elements of the second set are in the first. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.MaximumElement
+ + + + Returns: + 'T
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns the highest element in the set according to the ordering being used for the set. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.MinimumElement
+ + + + Returns: + 'T
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns the lowest element in the set according to the ordering being used for the set. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Remove
+ + + Parameters: +
'T
+ -
+ The value to remove from the set.
+
+ + + + Returns: + Set<'T>
+
+ The result set.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A useful shortcut for Set.remove. Note this operation produces a new set + and does not mutate the original set. The new set will share many storage + nodes with the original. See the Set module for further operations on sets. + + |
+
+ Static member + | ++ Description + | +
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+val set1: Set<int>
+Multiple items
+module Set + +from Microsoft.FSharp.Collections -------------------- type Set<'T (requires comparison)> = + interface IReadOnlyCollection<'T> + interface IStructuralEquatable + interface IComparable + interface IEnumerable + interface IEnumerable<'T> + interface ICollection<'T> + new: elements: 'T seq -> Set<'T> + member Add: value: 'T -> Set<'T> + member Contains: value: 'T -> bool + override Equals: obj -> bool + ... -------------------- new: elements: 'T seq -> Set<'T> val empty<'T (requires comparison)> : Set<'T> (requires comparison)
+val set2: Set<int>
+val printfn: format: Printf.TextWriterFormat<'T> -> 'T
+
+
+ The sample evaluates to the following output: The new set is: set [1; 2; 3; 4]
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns a new set with the elements of the second set removed from the first. + + |
+
+ Common notions of value identity implementing the IEqualityComparer + interface, for constructing Dictionary objects and other collections +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FromFunctions hasher equality
+ + + Parameters: +
'T -> int
+ -
+ A function to generate a hash code from a value.
+
+ + + + equality + + : + 'T -> 'T -> bool
+ -
+ A function to test equality of two values.
+
+ + + + Returns: + IEqualityComparer<'T>
+
+ An object implementing IEqualityComparer using the given functions.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Get an implementation of equality semantics using the given functions. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ LimitedStructural limit
+ + + Parameters: +
int
+ -
+ The limit on the number of hashing operations used.
+
+ + + + Returns: + IEqualityComparer<'T>
+
+ An object implementing IEqualityComparer.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Get an implementation of equality semantics semantics using limited structural equality and structural hashing. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ NonStructural
+ + + + Returns: + IEqualityComparer<^T>
+
+
+ An object implementing IEqualityComparer using NonStructuralComparison.op_Equality
+ and NonStructuralComparison.hash.
+
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Get an implementation of equality semantics using non-structural equality and non-structural hashing. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Reference
+ + + + Returns: + IEqualityComparer<'T>
+
+
+ An object implementing IEqualityComparer using LanguagePrimitives.PhysicalEquality
+ and LanguagePrimitives.PhysicalHash.
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Get an implementation of equality semantics using reference equality and reference hashing. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Structural
+ + + + Returns: + IEqualityComparer<'T>
+
+ An object implementing IEqualityComparer using Operators.op_Equality and Operators.hash.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Get an implementation of equality semantics using structural equality and structural hashing. + + |
+
+ The type of immutable singly-linked lists. +
+
+ See the List module for further operations related to lists.
+
+ Use the constructors []
and ::
(infix) to create values of this type, or
+ the notation [1; 2; 3]
. Use the values in the List
module to manipulate
+ values of this type, or pattern match against the values directly.
+
+ See also F# Language Guide - Lists.
+
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Head
+ + + + Returns: + 'T
+
+ + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this[index]
+ + + Parameters: +
int
+ -
+ The index.
+
+ + + + Returns: + 'T
+
+ The value at the given index.
+ + |
+ + + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+ Static member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+ Contains operations for working with values of type list. +
++ Function or value + | ++ Description + | +||||
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns a new list that contains all pairings of elements from two lists. + + |
+ ||||
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns a new list that contains the elements of the first list + followed by elements of the second list. + + |
+ ||||
+
+
+
+
+
+
+
+ Full Usage:
+
+ List.average list
+ + + Parameters: +
^T list
+ -
+ The input list.
+
+ + + + Returns: + ^T
+
+ The resulting average.
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+ + ++
+ Example +++
+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 average: list: 'T list -> 'T (requires member (+) and member DivideByInt and member Zero)
+
+
+ Evaluates to
+
+
+
+
+ |
+ ||||
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ List.averageBy projection list
+ + + Parameters: +
'T -> ^U
+ -
+ The function to transform the list elements into the values to be averaged.
+
+ + + + list + + : + 'T list
+ -
+ The input list.
+
+ + + + Returns: + ^U
+
+ The resulting average.
+ + Modifiers: + inline + + Type parameters: + 'T, ^U + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns the average of values in a list generated by applying a function to each element of the list. + + |
+
+ + ArgumentException + + | ++ Thrown when the list is empty. + | +
+ Calculate average age of persons by extracting their age from a record type. +
type People = { Name: string; Age: int }
+
+ let getAgeAsFloat person = float person.Age
+
+ let people =
+ [ { Name = "Kirk"; Age = 26 }
+ { Name = "Spock"; Age = 90 }
+ { Name = "McCoy"; Age = 37 } ]
+
+ people |> List.averageBy getAgeAsFloat
+
+ 51.0
+
+
+
+
+
+
+
+ List.choose chooser list
+ 'T -> 'U option
+ -
+ The function to be applied to the list elements.
+
+ 'T list
+ -
+ The input list.
+
+ 'U list
+
+ The resulting list comprising the values v
where the chooser function returned Some(x)
.
+
+ Applies a function to each element in a list and then returns
+ a list of values v
where the applied function returned Some(v)
.
+
+ Returns an empty list when the input list is empty or when the applied chooser function
+ returns None
for all elements.
+
+
'T -> 'U option
+ + The function to be applied to the list elements. +
+'T list
+ + The input list. +
+'U list
+
+ The resulting list comprising the values v
where the chooser function returned Some(x)
.
+
+
+ Using the identity function id
(is defined like fun x -> x
):
+
+ let input1 = [ Some 1; None; Some 3; None ]
+
+ input1 |> List.choose id
+
+ [ 1; 3 ]
+
+
+
+
+ +
type Happiness =
+ | AlwaysHappy
+ | MostOfTheTimeGrumpy
+
+ type People = { Name: string; Happiness: Happiness }
+
+ let takeJustHappyPersons person =
+ match person.Happiness with
+ | AlwaysHappy -> Some person.Name
+ | MostOfTheTimeGrumpy -> None
+
+ let candidatesForTheTrip =
+ [ { Name = "SpongeBob"
+ Happiness = AlwaysHappy }
+ { Name = "Patrick"
+ Happiness = AlwaysHappy }
+ { Name = "Squidward"
+ Happiness = MostOfTheTimeGrumpy } ]
+
+ candidatesForTheTrip
+ |> List.choose takeJustHappyPersons
+
+ [ "SpongeBob"; "Patrick" ]
+
+
+
+
+ +
let input3: int option list = []
+
+ input3 |> List.choose id
+ Evaluates to:
+ empty list
+
++
let input4: string option list = [None; None]
+
+ input4 |> List.choose id
+ Evaluates to
+ empty list
+
+
+
+ Using the identity function id
(is defined like fun x -> x
):
+
+ let input5 = [ Some 1; None; Some 3; None ]
+
+ input5 |> List.choose id // evaluates [1; 3]
+
+
+
+
+
+
+ Divides the input list into lists (chunks) with at a positive number of at most chunkSize
elements.
+ Returns a new list containing the generated lists (chunks) as its elements.
+
+ Returns an empty list when the input list is empty.
+
int
+ + The maximum size of each chunk. +
+'T list
+ + The input list. +
++ + ArgumentException + + | +
+ Thrown when chunkSize is not positive.
+ |
+
+
[ 1..10 ] |> List.chunkBySize 3
+
+ [ [ 1; 2; 3 ]
+ [ 4; 5; 6 ]
+ [ 7; 8; 9 ]
+ [ 10 ] ]
+
+
+
+
+ +
[ 1..5 ] |> List.chunkBySize 10
+
+ [ [ 1; 2; 3; 4; 5 ] ]
+
+
+
+
+
+
+
+ List.collect mapping list
+ 'T -> 'U list
+ -
+ The function to transform each input element into a sublist to be concatenated.
+
+ 'T list
+ -
+ The input list.
+
+ 'U list
+
+ The concatenation of the transformed sublists.
+ + For each element of the list, applies the given function. Concatenates all the results and return the combined list. +
+'T -> 'U list
+ + The function to transform each input element into a sublist to be concatenated. +
+'T list
+ + The input list. +
+'U list
+ + The concatenation of the transformed sublists. +
++ For each positive number in the array we are generating all the previous positive numbers +
[1..4] |> List.collect (fun x -> [1..x])
+
+[1; 1; 2; 1; 2; 3; 1; 2; 3; 4]
(added extra spaces for easy reading)
+
+
+
+
+
+ List.compareWith comparer list1 list2
+ 'T -> 'T -> int
+ -
+ A function that takes an element from each list and returns an int.
+ If it evaluates to a non-zero value iteration is stopped and that value is returned.
+
+ 'T list
+ -
+ The first input list.
+
+ 'T list
+ -
+ The second input list.
+
+ int
+
+ Returns the first non-zero result from the comparison function. If the first list has a
+ larger element, the return value is always positive. If the second list has a larger
+ element, the return value is always negative. When the elements are equal in the two
+ lists, 1 is returned if the first list is longer, 0 is returned if they are equal in
+ length, and -1 is returned when the second list is longer.
+ + Compares two lists using the given comparison function, element by element. +
+'T -> 'T -> int
+ + A function that takes an element from each list and returns an int. + If it evaluates to a non-zero value iteration is stopped and that value is returned. +
+'T list
+ + The first input list. +
+'T list
+ + The second input list. +
+int
+ + Returns the first non-zero result from the comparison function. If the first list has a + larger element, the return value is always positive. If the second list has a larger + element, the return value is always negative. When the elements are equal in the two + lists, 1 is returned if the first list is longer, 0 is returned if they are equal in + length, and -1 is returned when the second list is longer. +
++
let closerToNextDozen a b =
+ (a % 12).CompareTo(b % 12)
+
+ let input1 = [1; 10]
+ let input2 = [1; 10]
+
+ (input1, input2) ||> List.compareWith closerToNextDozen
+
+0
+
+ +
let closerToNextDozen a b =
+ (a % 12).CompareTo(b % 12)
+
+ let input1 = [1; 5]
+ let input2 = [1; 8]
+
+ (input1, input2) ||> List.compareWith closerToNextDozen
+
+-1
+
+ +
let closerToNextDozen a b =
+ (a % 12).CompareTo(b % 12)
+
+ let input1 = [1; 11]
+ let input2 = [1; 13]
+
+ (input1, input2) ||> List.compareWith closerToNextDozen
+
+1
+
+ +
let closerToNextDozen a b =
+ (a % 12).CompareTo(b % 12)
+
+ let input1 = [1; 2]
+ let input2 = [1]
+
+ (input1, input2) ||> List.compareWith closerToNextDozen
+
+1
+
+ +
let closerToNextDozen a b =
+ (a % 12).CompareTo(b % 12)
+
+ let input1 = [1]
+ let input2 = [1; 2]
+
+ (input1, input2) ||> List.compareWith closerToNextDozen
+
+-1
+
+
+
+
+
+ List.concat lists
+
+
+
+
+
+ + Returns a new list that contains the elements of each the lists in order. +
+'T list
+ + The resulting concatenated list. +
++
let input = [ [1;2]
+ [3;4;5]
+ [6;7;8;9] ]
+ input |> List.concat // evaluates [1; 2; 3; 4; 5; 6; 7; 8; 9]
+
+
+
+
+ List.contains value source
+ 'T
+ -
+ The value to locate in the input list.
+
+ 'T list
+ -
+ The input list.
+
+ bool
+
+ True if the input list contains the specified element; false otherwise.
+ 'T
+ + The value to locate in the input list. +
+'T list
+ + The input list. +
+bool
+ + True if the input list contains the specified element; false otherwise. +
++
[1..9] |> List.contains 0
+
+false
.
+
+
+ +
[1..9] |> List.contains 3
+
+true
.
+
+
+ +
let input = [1, "SpongeBob"; 2, "Patrick"; 3, "Squidward"; 4, "Mr. Krabs"]
+
+ input |> List.contains (2, "Patrick")
+
+true
.
+
+
+ +
let input = [1, "SpongeBob"; 2, "Patrick"; 3, "Squidward"; 4, "Mr. Krabs"]
+
+ input |> List.contains (22, "Patrick")
+
+false
.
+
+
+
+
+
+ List.countBy projection list
+ 'T -> 'Key
+ -
+ A function transforming each item of the input list into a key to be
+ compared against the others.
+
+ 'T list
+ -
+ The input list.
+
+ ('Key * int) list
+
+ The result list.
+ + Applies a key-generating function to each element of a list and returns a list yielding unique + keys and their number of occurrences in the original list. +
+'T -> 'Key
+ + A function transforming each item of the input list into a key to be + compared against the others. +
+'T list
+ + The input list. +
++ Counting the number of occurrences of chars +
let input = ['H'; 'a'; 'p'; 'p'; 'y']
+
+ input |> List.countBy id
+
+[('H', 1); ('a', 1); ('p', 2); ('y', 1)]
+
+
+
+
+
+ List.distinct list
+
+
+
+
+
+ + Returns a list that contains no duplicate entries according to generic hash and + equality comparisons on the entries. + If an element occurs multiple times in the list then the later occurrences are discarded. +
+'T list
+ + The input list. +
+'T list
+ + The result list. +
++
let input = [6;1;2;3;1;4;5;5]
+
+ input |> List.distinct
+
+[6; 1; 2; 3; 4; 5]
.
+
+
+
+
+
+
+ + Returns a list that contains no duplicate entries according to the + generic hash and equality comparisons on the keys returned by the given key-generating function. + If an element occurs multiple times in the list then the later occurrences are discarded. +
+'T -> 'Key
+ + A function transforming the list items into comparable keys. +
+'T list
+ + The input list. +
+'T list
+ + The result list. +
++
let isEven x = 0 = x % 2
+
+ let input = [6;1;2;3;1;4;5;5]
+
+ input |> List.distinctBy isEven // evaluates [6; 1]
+
+
+
+
+
+ List.empty
+
+
+
+
+
+
+
+
+ List.exactlyOne list
+
+
+
+
+ List.exactlyOne list
+ 'T list
+ -
+ The input list.
+
+ 'T
+
+ The only element of the list.
+ 'T list
+ + The input list. +
+'T
+ + The only element of the list. +
++ + ArgumentException + + | ++ Thrown when the input does not have precisely one element. + | +
+
["the chosen one"] |> List.exactlyOne // evaluates "the chosen one"
+
++
let input : string list = []
+
+ input |> List.exactlyOne
+
+System.ArgumentException: The input sequence was empty
+
+ +
[1..5] |> List.exactlyOne
+
+System.ArgumentException: The input sequence contains more than one element
+
+
+
+
+ List.except itemsToExclude list
+ 'T seq
+ -
+ A sequence whose elements that also occur in the input list will cause those elements to be
+ removed from the result.
+
+ 'T list
+ -
+ A list whose elements that are not also in itemsToExclude will be returned.
+
+ 'T list
+
+ A list that contains the distinct elements of list
that do not appear in itemsToExclude
.
+ + Returns a new list with the distinct elements of the input list which do not appear in the itemsToExclude sequence, + using generic hash and equality comparisons to compare values. +
+'T seq
+ + A sequence whose elements that also occur in the input list will cause those elements to be + removed from the result. +
+'T list
+ + A list whose elements that are not also in itemsToExclude will be returned. +
+'T list
+
+ A list that contains the distinct elements of list
that do not appear in itemsToExclude
.
+
+ + ArgumentNullException + + | ++ Thrown when itemsToExclude is null. + | +
+
let input = [1, "Kirk"; 2, "Spock"; 3, "Kenobi"]
+
+ input |> List.except [3, "Kenobi"]
+
+[(1, "Kirk"); (2, "Spock")]
.
+
+
+ +
[0..10] |> List.except [1..5] // evaluates [0; 6; 7; 8; 9; 10]
+
++
[1..5] |> List.except [0..10] // evaluates []
+
+
+
+
+
+ + The predicate is applied to the elements of the input list. If any application + returns true then the overall result is true and no further elements are tested. + Otherwise, false is returned. +
+'T -> bool
+ + The function to test the input elements. +
+'T list
+ + The input list. +
+bool
+ + True if any element satisfies the predicate. +
++
let input = [1, "Kirk"; 2, "Spock"; 3, "Kenobi"]
+
+ input |> List.exists (fun x -> x = (3, "Kenobi")) // evaluates true
+
+ input |> List.exists (fun (n, name) -> n > 5) // evaluates false
+
+
+
+
+ List.exists2 predicate list1 list2
+ 'T1 -> 'T2 -> bool
+ -
+ The function to test the input elements.
+
+ 'T1 list
+ -
+ The first input list.
+
+ 'T2 list
+ -
+ The second input list.
+
+ bool
+
+ True if any pair of elements satisfy the predicate.
+ + Tests if any pair of corresponding elements of the lists satisfies the given predicate. +
++ The predicate is applied to matching elements in the two collections up to the lesser of the + two lengths of the collections. If any application returns true then the overall result is + true and no further elements are tested. Otherwise, if one collections is longer + than the other then the ArgumentException exception is raised. + Otherwise, false is returned. +
+'T1 -> 'T2 -> bool
+ + The function to test the input elements. +
+'T1 list
+ + The first input list. +
+'T2 list
+ + The second input list. +
+bool
+ + True if any pair of elements satisfy the predicate. +
++ + ArgumentException + + | ++ Thrown when the input lists differ in length. + | +
+ Check if the sum of pairs (from 2 different lists) have at least one even number +
let anEvenSum a b = 0 = (a + b) % 2
+
+ ([1..4], [2..5])
+ ||> List.exists2 anEvenSum // evaluates false
+
+ ([1..4], [2;4;5;6])
+ ||> List.exists2 anEvenSum // evaluates true
+
+
+
+
+ List.filter predicate list
+ 'T -> bool
+ -
+ The function to test the input elements.
+
+ 'T list
+ -
+ The input list.
+
+ 'T list
+
+ A list containing only the elements that satisfy the predicate.
+ + Returns a new collection containing only the elements of the collection + for which the given predicate returns "true" +
+'T -> bool
+ + The function to test the input elements. +
+'T list
+ + The input list. +
+'T list
+ + A list containing only the elements that satisfy the predicate. +
++
let input = [1, "Luke"; 2, "Kirk"; 3, "Kenobi"; 4, "Spock"]
+
+ let isEven x = 0 = x % 2
+
+ let isComingFromStarTrek (x,_) = isEven x
+
+ input |> List.filter isComingFromStarTrek
+
+[(2, "Kirk"); (4, "Spock")]
+
+
+
+
+
+
+ Returns the first element for which the given function returns True.
+ Raises KeyNotFoundException
if no such element exists.
+
'T -> bool
+ + The function to test the input elements. +
+'T list
+ + The input list. +
+'T
+ + The first element that satisfies the predicate. +
++ + KeyNotFoundException + + | ++ Thrown if the predicate evaluates to false for + all the elements of the list. + | +
+
let isEven x = 0 = x % 2
+
+ let isGreaterThan x y = y > x
+
+ let input = [1, "Luke"; 2, "Kirk"; 3, "Spock"; 4, "Kenobi"]
+
+ input |> List.find (fun (x,_) -> isEven x) // evaluates (2, "Kirk")
+ input |> List.find (fun (x,_) -> x |> isGreaterThan 6) // raises an exception
+
+
+
+
+
+
+ Returns the last element for which the given function returns True.
+ Raises KeyNotFoundException
if no such element exists.
+
'T -> bool
+ + The function to test the input elements. +
+'T list
+ + The input list. +
+'T
+ + The last element that satisfies the predicate. +
++ + KeyNotFoundException + + | ++ Thrown if the predicate evaluates to false for + all the elements of the list. + | +
+
let isEven x = 0 = x % 2
+
+ let isGreaterThan x y = y > x
+
+ let input = [1, "Luke"; 2, "Kirk"; 3, "Spock"; 4, "Kenobi"]
+
+ input |> List.findBack (fun (x,_) -> isEven x) // evaluates (4, "Kenobi")
+ input |> List.findBack (fun (x,_) -> x |> isGreaterThan 6) // raises an exception
+
+
+
+
+
+ Returns the index of the first element in the list
+ that satisfies the given predicate.
+ Raises KeyNotFoundException
if no such element exists.
+
'T -> bool
+ + The function to test the input elements. +
+'T list
+ + The input list. +
+int
+ + The index of the first element that satisfies the predicate. +
++ + ArgumentException + + | ++ Thrown if the predicate evaluates to false for all the + elements of the list. + | +
+
let isEven x = 0 = x % 2
+
+ let isGreaterThan x y = y > x
+
+ let input = [1, "Luke"; 2, "Kirk"; 3, "Spock"; 4, "Kenobi"]
+
+ input |> List.findIndex (fun (x,_) -> isEven x) // evaluates 1
+ input |> List.findIndex (fun (x,_) -> x |> isGreaterThan 6) // raises an exception
+
+
+
+
+
+ Returns the index of the last element in the list
+ that satisfies the given predicate.
+ Raises KeyNotFoundException
if no such element exists.
+
'T -> bool
+ + The function to test the input elements. +
+'T list
+ + The input list. +
+int
+ + The index of the last element that satisfies the predicate. +
++ + ArgumentException + + | ++ Thrown if the predicate evaluates to false for all the + elements of the list. + | +
+
let isEven x = 0 = x % 2
+
+ let isGreaterThan x y = y > x
+
+ let input = [1, "Luke"; 2, "Kirk"; 3, "Spock"; 4, "Kenobi"]
+
+ input |> List.findIndexBack (fun (x,_) -> isEven x) // evaluates 3
+ input |> List.findIndexBack (fun (x,_) -> x |> isGreaterThan 6) // raises an exception
+
+
+
+
+ List.fold folder state list
+ 'State -> 'T -> 'State
+ -
+ The function to update the state given the input elements.
+
+ 'State
+ -
+ The initial state.
+
+ 'T list
+ -
+ The input list.
+
+ 'State
+
+ The final state value.
+
+ Applies a function to each element of the collection, threading an accumulator argument
+ through the computation. Take the second argument, and apply the function to it
+ and the first element of the list. Then feed this result into the function along
+ with the second element and so on. Return the final result.
+ If the input function is f
and the elements are i0...iN
then
+ computes f (... (f s i0) i1 ...) iN
.
+
'State -> 'T -> 'State
+ + The function to update the state given the input elements. +
+'State
+ + The initial state. +
+'T list
+ + The input list. +
+'State
+ + The final state value. +
++ Making the sum of squares for the first 5 natural numbers +
(0, [1..5]) ||> List.fold (fun s v -> s + v * v) // evaluates 55
+
++ Shopping for fruits hungry, you tend to take more of each as the hunger grows +
type Fruit = Apple | Pear | Orange
+
+ type BagItem = { fruit: Fruit; quantity: int }
+
+ let takeMore (previous: BagItem list) fruit =
+ let toTakeThisTime =
+ match previous with
+ | bagItem :: otherBagItems -> bagItem.quantity + 1
+ | [] -> 1
+ { fruit = fruit; quantity = toTakeThisTime } :: previous
+
+ let inputs = [ Apple; Pear; Orange ]
+
+ ([], inputs) ||> List.fold takeMore
+
+ [{ fruit = Orange; quantity = 3 }
+ { fruit = Pear; quantity = 2 }
+ { fruit = Apple; quantity = 1 }]
+
+
+
+
+
+
+
+ List.fold2 folder state list1 list2
+ 'State -> 'T1 -> 'T2 -> 'State
+ -
+ The function to update the state given the input elements.
+
+ 'State
+ -
+ The initial state.
+
+ 'T1 list
+ -
+ The first input list.
+
+ 'T2 list
+ -
+ The second input list.
+
+ 'State
+
+ The final state value.
+
+ Applies a function to corresponding elements of two collections, threading an accumulator argument
+ through the computation. The collections must have identical sizes.
+ If the input function is f
and the elements are i0...iN
and j0...jN
+ then computes f (... (f s i0 j0)...) iN jN
.
+
'State -> 'T1 -> 'T2 -> 'State
+ + The function to update the state given the input elements. +
+'State
+ + The initial state. +
+'T1 list
+ + The first input list. +
+'T2 list
+ + The second input list. +
+'State
+ + The final state value. +
++
Count the number of times the coins match:
+ type CoinToss = Head | Tails
+
+ let inputs1 = [Tails; Head; Tails]
+ let inputs2 = [Tails; Head; Head]
+
+ (0, inputs1, inputs2) |||> List.fold2 (fun acc input1 input2 ->
+ match (input1, input2) with
+ | Head, Head -> acc + 1
+ | Tails, Tails -> acc + 1
+ | _ -> acc)
+
+1
. Note acc
is a commonly used abbreviation for "accumulator".
+
+
+
+
+
+ List.foldBack folder list state
+ 'T -> 'State -> 'State
+ -
+ The function to update the state given the input elements.
+
+ 'T list
+ -
+ The input list.
+
+ 'State
+ -
+ The initial state.
+
+ 'State
+
+ The state object after the folding function is applied to each element of the list.
+
+ Applies a function to each element of the collection, starting from the end, threading an accumulator argument
+ through the computation. If the input function is f
and the elements are i0...iN
then
+ computes f i0 (...(f iN s))
.
+
'T -> 'State -> 'State
+ + The function to update the state given the input elements. +
+'T list
+ + The input list. +
+'State
+ + The initial state. +
+'State
+ + The state object after the folding function is applied to each element of the list. +
++ Making the sum of squares for the first 5 natural numbers +
([1..5], 0) ||> List.foldBack (fun v acc -> acc + v * v) // evaluates 55
+
+acc
is a commonly used abbreviation for "accumulator".
+
+
+ + Shopping for fruits hungry, you tend to take more of each as the hunger grows +
type Fruit = Apple | Pear | Orange
+
+ type BagItem = { fruit: Fruit; quantity: int }
+
+ let takeMore fruit (previous: BagItem list) =
+ let toTakeThisTime =
+ match previous with
+ | bagItem :: otherBagItems -> bagItem.quantity + 1
+ | [] -> 1
+ { fruit = fruit; quantity = toTakeThisTime } :: previous
+
+ let input = [ Apple; Pear; Orange ]
+
+ (input, []) ||> List.foldBack takeMore
+
+ [{ fruit = Apple; quantity = 3 }
+ { fruit = Pear; quantity = 2 }
+ { fruit = Orange; quantity = 1 }]
+
+
+
+
+
+
+
+ List.foldBack2 folder list1 list2 state
+ 'T1 -> 'T2 -> 'State -> 'State
+ -
+ The function to update the state given the input elements.
+
+ 'T1 list
+ -
+ The first input list.
+
+ 'T2 list
+ -
+ The second input list.
+
+ 'State
+ -
+ The initial state.
+
+ 'State
+
+ The final state value.
+
+ Applies a function to corresponding elements of two collections, threading an accumulator argument
+ through the computation. The collections must have identical sizes.
+ If the input function is f
and the elements are i0...iN
and j0...jN
+ then computes f i0 j0 (...(f iN jN s))
.
+
'T1 -> 'T2 -> 'State -> 'State
+ + The function to update the state given the input elements. +
+'T1 list
+ + The first input list. +
+'T2 list
+ + The second input list. +
+'State
+ + The initial state. +
+'State
+ + The final state value. +
++
Count the positives, negatives and accumulate some text from back to front:
+ type Count =
+ { Positive: int
+ Negative: int
+ Text: string }
+
+ let inputs1 = [ -1; -2; -3 ]
+ let inputs2 = [ 3; 2; 1 ]
+ let initialState = {Positive = 0; Negative = 0; Text = ""}
+
+ (inputs1, inputs2, initialState) |||> List.foldBack2 (fun a b acc ->
+ let text = acc.Text + "(" + string a + "," + string b + ") "
+ if a + b >= 0 then
+ { acc with
+ Positive = acc.Positive + 1
+ Text = text }
+ else
+ { acc with
+ Negative = acc.Negative + 1
+ Text = text }
+ )
+
+ { Positive = 2
+ Negative = 1
+ Text = "(-3,1) (-2,2) (-1,3) " }
+
+
+
+ Note acc
is a commonly used abbreviation for "accumulator".
+
+
+
+
+
+
+ + Tests if all elements of the collection satisfy the given predicate. +
++ The predicate is applied to the elements of the input list. If any application + returns false then the overall result is false and no further elements are tested. + Otherwise, true is returned. +
+'T -> bool
+ + The function to test the input elements. +
+'T list
+ + The input list. +
+bool
+ + True if all of the elements satisfy the predicate. +
++
let isEven a = a % 2 = 0
+
+ [2; 42] |> List.forall isEven // evaluates to true
+
+ [1; 2] |> List.forall isEven // evaluates to false
+
+
+
+
+ List.forall2 predicate list1 list2
+ 'T1 -> 'T2 -> bool
+ -
+ The function to test the input elements.
+
+ 'T1 list
+ -
+ The first input list.
+
+ 'T2 list
+ -
+ The second input list.
+
+ bool
+
+ True if all of the pairs of elements satisfy the predicate.
+ + Tests if all corresponding elements of the collection satisfy the given predicate pairwise. +
++ The predicate is applied to matching elements in the two collections up to the lesser of the + two lengths of the collections. If any application returns false then the overall result is + false and no further elements are tested. Otherwise, if one collection is longer + than the other then the ArgumentException exception is raised. + Otherwise, true is returned. +
+'T1 -> 'T2 -> bool
+ + The function to test the input elements. +
+'T1 list
+ + The first input list. +
+'T2 list
+ + The second input list. +
+bool
+ + True if all of the pairs of elements satisfy the predicate. +
++ + ArgumentException + + | ++ Thrown when the input lists differ in length. + | +
+
let inputs1 = [1; 2; 3]
+ let inputs2 = [1; 2; 3]
+
+ (inputs1, inputs2) ||> List.forall2 (=)
+
+true
.
+
+
+ +
let items1 = [2017; 1; 1]
+ let items2 = [2019; 19; 8]
+
+ (items1, items2) ||> List.forall2 (=)
+
+false
.
+
+
+ +
let items1 = [1; 2; 3]
+ let items2 = [1; 2]
+
+ (items1, items2) ||> List.forall2 (=)
+
+ArgumentException
.
+
+
+
+
+
+ List.groupBy projection list
+ 'T -> 'Key
+ -
+ A function that transforms an element of the list into a comparable key.
+
+ 'T list
+ -
+ The input list.
+
+ ('Key * 'T list) list
+
+ The result list.
+ + Applies a key-generating function to each element of a list and yields a list of + unique keys. Each unique key contains a list of all elements that match + to this key. +
+'T -> 'Key
+ + A function that transforms an element of the list into a comparable key. +
+'T list
+ + The input list. +
++
let inputs = [1; 2; 3; 4; 5]
+
+ inputs |> List.groupBy (fun n -> n % 2)
+
+[(1, [1; 3; 5]); (0, [2; 4])]
+
+
+
+
+
+ List.head list
+
+
+
+
+ List.head list
+ 'T list
+ -
+ The input list.
+
+ 'T
+
+ The first element of the list.
+ 'T list
+ + The input list. +
+'T
+ + The first element of the list. +
++ + ArgumentException + + | ++ Thrown when the list is empty. + | +
+
let inputs = ["banana"; "pear"]
+
+ inputs |> List.head
+
+banana
+
+ +
[] |> List.head
+
+ArgumentException
+
+
+
+
+
+ List.indexed list
+
+
+
+
+
+ + Returns a new list whose elements are the corresponding elements + of the input list paired with the index (from 0) of each element. +
+'T list
+ + The input list. +
++
let inputs = ["a"; "b"; "c"]
+
+ inputs |> List.indexed
+
+[(0, "a"); (1, "b"); (2, "c")]
+
+
+
+
+ int
+ + The length of the list to generate. +
+int -> 'T
+ + The function to generate an element from an index. +
+'T list
+ + The list of generated elements. +
++ + ArgumentException + + | ++ Thrown when the input length is negative. + | +
+
List.init 4 (fun v -> v + 5)
+
+[5; 6; 7; 8]
+
+ +
List.init -5 (fun v -> v + 5)
+
+ArgumentException
+
+
+
+
+ List.insertAt index value source
+ int
+ -
+ The index where the item should be inserted.
+
+ 'T
+ -
+ The value to insert.
+
+ 'T list
+ -
+ The input list.
+
+ 'T list
+
+ The result list.
+ int
+ + The index where the item should be inserted. +
+'T
+ + The value to insert. +
+'T list
+ + The input list. +
+'T list
+ + The result list. +
++ + ArgumentException + + | ++ Thrown when index is below 0 or greater than source.Length. + | +
+
let inputs = [ 0; 1; 2 ]
+
+ inputs |> List.insertAt 1 9
+
+[ 0; 9; 1; 2 ]
.
+
+
+
+
+
+ List.insertManyAt index values source
+ int
+ -
+ The index where the items should be inserted.
+
+ 'T seq
+ -
+ The values to insert.
+
+ 'T list
+ -
+ The input list.
+
+ 'T list
+
+ The result list.
+ int
+ + The index where the items should be inserted. +
+'T seq
+ + The values to insert. +
+'T list
+ + The input list. +
+'T list
+ + The result list. +
++ + ArgumentException + + | ++ Thrown when index is below 0 or greater than source.Length. + | +
+
let inputs = [ 0; 1; 2 ]
+
+ inputs |> List.insertManyAt 1 [ 8; 9 ]
+ Evaluates to [ 0; 8; 9; 1; 2 ].
+
+
+
+
+
+ List.isEmpty list
+
+
+
+
+
+ 'T list
+ + The input list. +
+bool
+ + True if the list is empty. +
++
[ ] |> List.isEmpty
+
+true
+
+ +
[ "pear"; "banana" ] |> List.isEmpty
+
+false
+
+
+
+
+
+ List.item index list
+
+
+
+
+
+ int
+ + The index to retrieve. +
+'T list
+ + The input list. +
+'T
+ + The value at the given index. +
++ + ArgumentException + + | ++ Thrown when the index is negative or the input list does not contain enough elements. + | +
+
let inputs = [ "a"; "b"; "c" ]
+
+ inputs |> List.item 1
+
+"b"
+
+ +
let inputs = [ "a"; "b"; "c" ]
+
+ inputs |> List.item 4
+
+ArgumentException
+
+
+
+
+
+ List.iter action list
+
+
+
+
+
+ 'T -> unit
+ + The function to apply to elements from the input list. +
+'T list
+ + The input list. +
++
let inputs = [ "a"; "b"; "c" ]
+
+ inputs |> List.iter (printfn "%s")
+
+unit
and prints
+ a
+ b
+ c
+
+
+
+ in the console.
+
+
+
+
+
+ List.iter2 action list1 list2
+ 'T1 -> 'T2 -> unit
+ -
+ The function to apply to pairs of elements from the input lists.
+
+ 'T1 list
+ -
+ The first input list.
+
+ 'T2 list
+ -
+ The second input list.
+
+ + Applies the given function to two collections simultaneously. The + collections must have identical size. +
+'T1 -> 'T2 -> unit
+ + The function to apply to pairs of elements from the input lists. +
+'T1 list
+ + The first input list. +
+'T2 list
+ + The second input list. +
++
let inputs1 = [ "a"; "b"; "c" ]
+ let inputs2 = [ 1; 2; 3 ]
+
+ (inputs1, inputs2) ||> List.iter2 (printfn "%s: %i")
+
+unit
and prints
+ a: 1
+ b: 2
+ c: 3
+
+
+
+ in the console.
+
+
+
+
+
+
+ List.iteri action list
+
+
+
+
+
+ + Applies the given function to each element of the collection. The integer passed to the + function indicates the index of element. +
+int -> 'T -> unit
+ + The function to apply to the elements of the list along with their index. +
+'T list
+ + The input list. +
++
let inputs = [ "a"; "b"; "c" ]
+
+ inputs |> List.iteri (fun i v -> printfn "{i}: {v}")
+
+unit
and prints
+ 0: a
+ 1: b
+ 2: c
+
+
+
+ in the console.
+
+
+
+
+
+ List.iteri2 action list1 list2
+ int -> 'T1 -> 'T2 -> unit
+ -
+ The function to apply to a pair of elements from the input lists along with their index.
+
+ 'T1 list
+ -
+ The first input list.
+
+ 'T2 list
+ -
+ The second input list.
+
+ + Applies the given function to two collections simultaneously. The + collections must have identical size. The integer passed to the + function indicates the index of element. +
+int -> 'T1 -> 'T2 -> unit
+ + The function to apply to a pair of elements from the input lists along with their index. +
+'T1 list
+ + The first input list. +
+'T2 list
+ + The second input list. +
++
let inputs1 = [ "a"; "b"; "c" ]
+ let inputs2 = [ "banana"; "pear"; "apple" ]
+
+ (inputs1, inputs2) ||> List.iteri2 (fun i s1 s2 -> printfn "Index %d: %s - %s" i s1 s2)
+
+unit
and prints
+ Index 0: a - banana
+ Index 1: b - pear
+ Index 2: c - apple
+
+
+
+ in the console.
+
+
+
+
+
+
+ List.last list
+
+
+
+
+ List.last list
+ 'T list
+ -
+ The input list.
+
+ 'T
+
+ The last element of the list.
+ 'T list
+ + The input list. +
+'T
+ + The last element of the list. +
++ + ArgumentException + + | ++ Thrown when the input does not have any elements. + | +
+
[ "pear"; "banana" ] |> List.last
+
+banana
+
+ +
[ ] |> List.last
+
+ArgumentException
+
+
+
+
+
+ List.length list
+
+
+
+
+
+
+ The notation array.Length
is preferred.
+
'T list
+ + The input list. +
+int
+ + The length of the list. +
++
let inputs = [ "a"; "b"; "c" ]
+
+ inputs |> List.length
+
+3
+
+
+
+
+
+ List.map mapping list
+
+
+
+
+
+ + Builds a new collection whose elements are the results of applying the given function + to each of the elements of the collection. +
+'T -> 'U
+ + The function to transform elements from the input list. +
+'T list
+ + The input list. +
+'U list
+ + The list of transformed elements. +
++
let inputs = [ "a"; "bbb"; "cc" ]
+
+ inputs |> List.map (fun x -> x.Length)
+
+[ 1; 3; 2 ]
+
+
+
+
+ List.map2 mapping list1 list2
+ 'T1 -> 'T2 -> 'U
+ -
+ The function to transform pairs of elements from the input lists.
+
+ 'T1 list
+ -
+ The first input list.
+
+ 'T2 list
+ -
+ The second input list.
+
+ 'U list
+
+ The list of transformed elements.
+ + Builds a new collection whose elements are the results of applying the given function + to the corresponding elements of the two collections pairwise. +
+'T1 -> 'T2 -> 'U
+ + The function to transform pairs of elements from the input lists. +
+'T1 list
+ + The first input list. +
+'T2 list
+ + The second input list. +
+'U list
+ + The list of transformed elements. +
++
let inputs1 = ["a"; "bad"; "good"]
+ let inputs2 = [0; 2; 1]
+
+ (inputs1, inputs2) ||> List.map2 (fun x y -> x.[y])
+
+seq ['a'; 'd'; 'o']
+
+
+
+
+ List.map3 mapping list1 list2 list3
+ 'T1 -> 'T2 -> 'T3 -> 'U
+ -
+ The function to transform triples of elements from the input lists.
+
+ 'T1 list
+ -
+ The first input list.
+
+ 'T2 list
+ -
+ The second input list.
+
+ 'T3 list
+ -
+ The third input list.
+
+ 'U list
+
+ The list of transformed elements.
+ + Builds a new collection whose elements are the results of applying the given function + to the corresponding elements of the three collections simultaneously. +
+'T1 -> 'T2 -> 'T3 -> 'U
+ + The function to transform triples of elements from the input lists. +
+'T1 list
+ + The first input list. +
+'T2 list
+ + The second input list. +
+'T3 list
+ + The third input list. +
+'U list
+ + The list of transformed elements. +
++
let inputs1 = [ "a"; "t"; "ti" ]
+ let inputs2 = [ "l"; "h"; "m" ]
+ let inputs3 = [ "l"; "e"; "e" ]
+
+ (inputs1, inputs2, inputs3) |||> List.map3 (fun x y z -> x + y + z)
+
+[ "all"; "the"; "time" ]
+
+
+
+
+ List.mapFold mapping state list
+ 'State -> 'T -> 'Result * 'State
+ -
+ The function to transform elements from the input list and accumulate the final value.
+
+ 'State
+ -
+ The initial state.
+
+ 'T list
+ -
+ The input list.
+
+ 'Result list * 'State
+
+ The list of transformed elements, and the final accumulated value.
+ + Combines map and fold. Builds a new list whose elements are the results of applying the given function + to each of the elements of the input list. The function is also used to accumulate a final value. +
+'State -> 'T -> 'Result * 'State
+ + The function to transform elements from the input list and accumulate the final value. +
+'State
+ + The initial state. +
+'T list
+ + The input list. +
+'Result list * 'State
+ + The list of transformed elements, and the final accumulated value. +
++ Accumulate the charges, and double them as well +
type Charge =
+ | In of int
+ | Out of int
+
+ let inputs = [ In 1; Out 2; In 3 ]
+
+ let newCharges, balance =
+ (0, inputs) ||> List.mapFold (fun acc charge ->
+ match charge with
+ | In i -> In (i*2), acc + i
+ | Out o -> Out (o*2), acc - o)
+
+newCharges
to [In 2; Out 4; In 6]
and balance
to 2
.
+ Note acc
is a commonly used abbreviation for "accumulator".
+
+
+
+
+
+ List.mapFoldBack mapping list state
+ 'T -> 'State -> 'Result * 'State
+ -
+ The function to transform elements from the input list and accumulate the final value.
+
+ 'T list
+ -
+ The input list.
+
+ 'State
+ -
+ The initial state.
+
+ 'Result list * 'State
+
+ The list of transformed elements, and the final accumulated value.
+ + Combines map and foldBack. Builds a new list whose elements are the results of applying the given function + to each of the elements of the input list. The function is also used to accumulate a final value. +
+'T -> 'State -> 'Result * 'State
+ + The function to transform elements from the input list and accumulate the final value. +
+'T list
+ + The input list. +
+'State
+ + The initial state. +
+'Result list * 'State
+ + The list of transformed elements, and the final accumulated value. +
++ Accumulate the charges from back to front, and double them as well +
type Charge =
+ | In of int
+ | Out of int
+
+ let charges = [ In 1; Out 2; In 3 ]
+
+ let newCharges, balance =
+ (charges, 0) ||> List.mapFoldBack (fun charge acc ->
+ match charge with
+ | In i -> In (i*2), acc + i
+ | Out o -> Out (o*2), acc - o)
+
+newCharges
to [In 2; Out 4; In 6]
and balance
to 2
.
+ Note acc
is a commonly used abbreviation for "accumulator".
+
+
+
+
+
+
+ List.mapi mapping list
+
+
+
+
+
+ + Builds a new collection whose elements are the results of applying the given function + to each of the elements of the collection. The integer index passed to the + function indicates the index (from 0) of element being transformed. +
+int -> 'T -> 'U
+ + The function to transform elements and their indices. +
+'T list
+ + The input list. +
+'U list
+ + The list of transformed elements. +
++
let inputs = [ 10; 10; 10 ]
+
+ inputs |> List.mapi (fun i x -> i + x)
+
+[ 10; 11; 12 ]
+
+
+
+
+ List.mapi2 mapping list1 list2
+ int -> 'T1 -> 'T2 -> 'U
+ -
+ The function to transform pairs of elements from the two lists and their index.
+
+ 'T1 list
+ -
+ The first input list.
+
+ 'T2 list
+ -
+ The second input list.
+
+ 'U list
+
+ The list of transformed elements.
+ + Like mapi, but mapping corresponding elements from two lists of equal length. +
+int -> 'T1 -> 'T2 -> 'U
+ + The function to transform pairs of elements from the two lists and their index. +
+'T1 list
+ + The first input list. +
+'T2 list
+ + The second input list. +
+'U list
+ + The list of transformed elements. +
++
let inputs1 = ["a"; "bad"; "good"]
+ let inputs2 = [0; 2; 1]
+
+ (inputs1, inputs2) ||> List.mapi2 (fun i x y -> i, x[y])
+
+[(0, 'a'); (1, 'd'); (2, 'o')]
+
+
+
+
+
+ List.max list
+
+
+
+
+ List.max list
+ 'T list
+ -
+ The input list.
+
+ 'T
+
+ The maximum element.
+ + Return the greatest of all elements of the list, compared via Operators.max. +
+
+ Raises ArgumentException if list
is empty
+
'T list
+ + The input list. +
+'T
+ + The maximum element. +
++ + ArgumentException + + | ++ Thrown when the list is empty. + | +
+
let inputs = [ 10; 12; 11 ]
+
+ inputs |> List.max
+
+12
+
+ +
let inputs = [ ]
+
+ inputs |> List.max
+
+System.ArgumentException
.
+
+
+
+
+
+ List.maxBy projection list
+ 'T -> 'U
+ -
+ The function to transform the list elements into the type to be compared.
+
+ 'T list
+ -
+ The input list.
+
+ 'T
+
+ The maximum element.
+ + Returns the greatest of all elements of the list, compared via Operators.max on the function result. +
+
+ Raises ArgumentException if list
is empty.
+
'T -> 'U
+ + The function to transform the list elements into the type to be compared. +
+'T list
+ + The input list. +
+'T
+ + The maximum element. +
++ + ArgumentException + + | ++ Thrown when the list is empty. + | +
+
let inputs = ["aaa"; "b"; "cccc"]
+
+ inputs |> List.maxBy (fun s -> s.Length)
+
+"cccc"
+
+ +
let inputs = []
+
+ inputs |> List.maxBy (fun (s: string) -> s.Length)
+
+System.ArgumentException
.
+
+
+
+
+
+
+ List.min list
+
+
+
+
+ List.min list
+ 'T list
+ -
+ The input list.
+
+ 'T
+
+ The minimum value.
+ + Returns the lowest of all elements of the list, compared via Operators.min. +
+
+ Raises ArgumentException if list
is empty
+
'T list
+ + The input list. +
+'T
+ + The minimum value. +
++ + ArgumentException + + | ++ Thrown when the list is empty. + | +
+
let inputs = [10; 12; 11]
+
+ inputs |> List.min
+
+10
+
+ +
let inputs = []
+
+ inputs |> List.min
+
+System.ArgumentException
.
+
+
+
+
+
+ List.minBy projection list
+ 'T -> 'U
+ -
+ The function to transform list elements into the type to be compared.
+
+ 'T list
+ -
+ The input list.
+
+ 'T
+
+ The minimum value.
+ + Returns the lowest of all elements of the list, compared via Operators.min on the function result +
+
+ Raises ArgumentException if list
is empty.
+
'T -> 'U
+ + The function to transform list elements into the type to be compared. +
+'T list
+ + The input list. +
+'T
+ + The minimum value. +
++ + ArgumentException + + | ++ Thrown when the list is empty. + | +
+
let inputs = ["aaa"; "b"; "cccc"]
+
+ inputs |> List.minBy (fun s -> s.Length)
+
+"b"
+
+ +
let inputs = []
+
+ inputs |> List.minBy (fun (s: string) -> s.Length)
+
+System.ArgumentException
.
+
+
+
+
+
+
+ List.ofArray array
+
+
+
+
+ List.ofArray array
+ 'T[]
+ -
+ The input array.
+
+ 'T list
+
+ The list of elements from the array.
+ 'T[]
+ + The input array. +
+'T list
+ + The list of elements from the array. +
++
let inputs = [| 1; 2; 5 |]
+
+ inputs |> List.ofArray
+
+[ 1; 2; 5 ]
.
+
+
+
+
+
+
+ List.ofSeq source
+
+
+
+
+
+ 'T seq
+ + The input sequence. +
+'T list
+ + The list of elements from the sequence. +
++
let inputs = seq { 1; 2; 5 }
+
+ inputs |> List.ofSeq
+
+[ 1; 2; 5 ]
.
+
+
+
+
+
+
+ List.pairwise list
+
+
+
+
+
+ + Returns a list of each element in the input list and its predecessor, with the + exception of the first element which is only returned as the predecessor of the second element. +
+'T list
+ + The input list. +
+('T * 'T) list
+ + The result list. +
++
let inputs = [1; 2; 3; 4]
+
+ inputs |> List.pairwise
+
+[(1, 2); (2, 3); (3, 4)]
.
+
+
+
+
+
+ List.partition predicate list
+ 'T -> bool
+ -
+ The function to test the input elements.
+
+ 'T list
+ -
+ The input list.
+
+ 'T list * 'T list
+
+ A list containing the elements for which the predicate evaluated to true and a list
+ containing the elements for which the predicate evaluated to false.
+ + Splits the collection into two collections, containing the + elements for which the given predicate returns True and False + respectively. Element order is preserved in both of the created lists. +
+'T -> bool
+ + The function to test the input elements. +
+'T list
+ + The input list. +
+'T list * 'T list
+ + A list containing the elements for which the predicate evaluated to true and a list + containing the elements for which the predicate evaluated to false. +
++
let inputs = [1; 2; 3; 4]
+
+ let evens, odds = inputs |> List.partition (fun x -> x % 2 = 0)
+
+evens
to [2; 4]
and odds
to [1; 3]
.
+
+
+
+
+
+
+ + Returns a list with all elements permuted according to the + specified permutation. +
+int -> int
+ + The function to map input indices to output indices. +
+'T list
+ + The input list. +
+'T list
+ + The permuted list. +
++ + ArgumentException + + | ++ Thrown when indexMap does not produce a valid permutation. + | +
+
let inputs = [1; 2; 3; 4]
+
+ inputs |> List.permute (fun x -> (x + 1) % 4)
+
+[4; 1; 2; 3]
.
+
+
+
+
+
+
+ List.pick chooser list
+
+
+
+
+
+
+ Applies the given function to successive elements, returning the first
+ result where function returns Some(x)
for some x. If no such
+ element exists then raise KeyNotFoundException
+
'T -> 'U option
+ + The function to generate options from the elements. +
+'T list
+ + The input list. +
+'U
+ + The first resulting value. +
++ + KeyNotFoundException + + | ++ Thrown when the list is empty. + | +
+
let input = [1; 2; 3]
+
+ input |> List.pick (fun n -> if n % 2 = 0 then Some (string n) else None)
+
+"2"
.
+
+
+ +
let input = [1; 2; 3]
+
+ input |> List.pick (fun n -> if n > 3 then Some (string n) else None)
+
+KeyNotFoundException
.
+
+
+
+
+
+ List.reduce reduction list
+ 'T -> 'T -> 'T
+ -
+ The function to reduce two list elements to a single element.
+
+ 'T list
+ -
+ The input list.
+
+ 'T
+
+ The final reduced value.
+
+ Apply a function to each element of the collection, threading an accumulator argument
+ through the computation. Apply the function to the first two elements of the list.
+ Then feed this result into the function along with the third element and so on.
+ Return the final result. If the input function is f
and the elements are i0...iN
then computes
+ f (... (f i0 i1) i2 ...) iN
.
+
+ Raises ArgumentException if list
is empty
+
'T -> 'T -> 'T
+ + The function to reduce two list elements to a single element. +
+'T list
+ + The input list. +
+'T
+ + The final reduced value. +
++ + ArgumentException + + | ++ Thrown when the list is empty. + | +
+
let inputs = [1; 3; 4; 2]
+
+ inputs |> List.reduce (fun a b -> a * 10 + b)
+
+1342
, by computing ((1 * 10 + 3) * 10 + 4) * 10 + 2
+
+
+
+
+ List.reduceBack reduction list
+ 'T -> 'T -> 'T
+ -
+ A function that takes in the next-to-last element of the list and the
+ current accumulated result to produce the next accumulated result.
+
+ 'T list
+ -
+ The input list.
+
+ 'T
+
+ The final result of the reductions.
+
+ Applies a function to each element of the collection, starting from the end, threading an accumulator argument
+ through the computation. If the input function is f
and the elements are i0...iN
then computes
+ f i0 (...(f iN-1 iN))
.
+
'T -> 'T -> 'T
+ + A function that takes in the next-to-last element of the list and the + current accumulated result to produce the next accumulated result. +
+'T list
+ + The input list. +
+'T
+ + The final result of the reductions. +
++ + ArgumentException + + | ++ Thrown when the list is empty. + | +
+
let inputs = [1; 3; 4; 2]
+
+ inputs |> List.reduceBack (fun a b -> a + b * 10)
+
+2431
, by computing 1 + (3 + (4 + 2 * 10) * 10) * 10
+
+
+
+
+
+ int
+ + The index of the item to be removed. +
+'T list
+ + The input list. +
+'T list
+ + The result list. +
++ + ArgumentException + + | ++ Thrown when index is outside 0..source.Length - 1 + | +
+
let inputs = [ 0; 1; 2 ]
+
+ inputs |> List.removeAt 1
+
+
+
+
+ List.removeManyAt index count source
+ int
+ -
+ The index of the item to be removed.
+
+ int
+ -
+ The number of items to remove.
+
+ 'T list
+ -
+ The input list.
+
+ 'T list
+
+ The result list.
+ + Return a new list with the number of items starting at a given index removed. +
+int
+ + The index of the item to be removed. +
+int
+ + The number of items to remove. +
+'T list
+ + The input list. +
+'T list
+ + The result list. +
++ + ArgumentException + + | ++ Thrown when index is outside 0..source.Length - count + | +
+
let inputs = [ 0; 1; 2; 3 ]
+
+ inputs |> List.removeManyAt 1 2
+
+[ 0; 3 ]
.
+
+
+
+
+
+
+ int
+ + The number of elements to replicate. +
+'T
+ + The value to replicate +
+'T list
+ + The generated list. +
++
List.replicate 3 "a"
+
+[ "a"; "a"; "a" ]
.
+
+
+
+
+
+
+ List.rev list
+
+
+
+
+
+ 'T list
+ + The input list. +
+'T list
+ + The reversed list. +
++
let inputs = [ 0; 1; 2 ]
+
+ inputs |> List.rev
+
+[ 2; 1; 0 ]
.
+
+
+
+
+
+ List.scan folder state list
+ 'State -> 'T -> 'State
+ -
+ The function to update the state given the input elements.
+
+ 'State
+ -
+ The initial state.
+
+ 'T list
+ -
+ The input list.
+
+ 'State list
+
+ The list of states.
+ + Applies a function to each element of the collection, threading an accumulator argument + through the computation. Take the second argument, and apply the function to it + and the first element of the list. Then feed this result into the function along + with the second element and so on. Returns the list of intermediate results and the final result. +
+'State -> 'T -> 'State
+ + The function to update the state given the input elements. +
+'State
+ + The initial state. +
+'T list
+ + The input list. +
+'State list
+ + The list of states. +
++ Apply a list charges and collect the running balances as each is applied: +
type Charge =
+ | In of int
+ | Out of int
+
+ let inputs = [In 1; Out 2; In 3]
+
+ (0, inputs) ||> List.scan (fun acc charge ->
+ match charge with
+ | In i -> acc + i
+ | Out o -> acc - o)
+
+[0; 1; -1; 2]
. Note 0
is the initial
+ state, 1
the next state, -1
the next state, and 2
the final state.
+ Note acc
is a commonly used abbreviation for "accumulator".
+
+
+
+
+
+ List.scanBack folder list state
+ 'T -> 'State -> 'State
+ -
+ The function to update the state given the input elements.
+
+ 'T list
+ -
+ The input list.
+
+ 'State
+ -
+ The initial state.
+
+ 'State list
+
+ The list of states.
+ 'T -> 'State -> 'State
+ + The function to update the state given the input elements. +
+'T list
+ + The input list. +
+'State
+ + The initial state. +
+'State list
+ + The list of states. +
++ Apply a list charges from back to front, and collect the running balances as each is applied: +
type Charge =
+ | In of int
+ | Out of int
+
+ let inputs = [ In 1; Out 2; In 3 ]
+
+ (inputs, 0) ||> List.scanBack (fun charge acc ->
+ match charge with
+ | In i -> acc + i
+ | Out o -> acc - o)
+
+ [2; 1; 3; 0]
by processing each input from back to front. Note 0
is the initial
+ state, 3
the next state, 1
the next state, and 2
the final state, and the states
+ are produced from back to front.
+ Note acc
is a commonly used abbreviation for "accumulator".
+
+
+
+
+
+
+ List.singleton value
+
+
+
+
+ List.singleton value
+ 'T
+ -
+ The input item.
+
+ 'T list
+
+ The result list of one item.
+ 'T
+ + The input item. +
+'T list
+ + The result list of one item. +
++
List.singleton 7
+
+[ 7 ]
.
+
+
+
+
+
+
+ List.skip count list
+
+
+
+
+ List.skip count list
+ int
+ -
+ The number of elements to skip. If the number is 0 or negative the input list is returned.
+
+ 'T list
+ -
+ The input list.
+
+ 'T list
+
+ The list after removing the first N elements.
+ int
+ + The number of elements to skip. If the number is 0 or negative the input list is returned. +
+'T list
+ + The input list. +
+'T list
+ + The list after removing the first N elements. +
++ + ArgumentException + + | ++ Thrown when count exceeds the number of + elements in the list. + | +
+
let inputs = ["a"; "b"; "c"; "d"]
+
+ inputs |> List.skip 2
+
+["c"; "d"]
+
+ +
let inputs = ["a"; "b"; "c"; "d"]
+
+ inputs |> List.skip 5
+
+ArgumentException
.
+
+
+ +
let inputs = ["a"; "b"; "c"; "d"]
+
+ inputs |> List.skip -1
+
+["a"; "b"; "c"; "d"]
.
+
+
+
+
+
+
+ + Bypasses elements in a list while the given predicate returns True, and then returns + the remaining elements of the list. +
+'T -> bool
+ + A function that evaluates an element of the list to a boolean value. +
+'T list
+ + The input list. +
+'T list
+ + The result list. +
++
let inputs = ["a"; "bbb"; "cc"; "d"]
+
+ inputs |> List.skipWhile (fun x -> x.Length < 3)
+
+["bbb"; "cc"; "d"]
+
+
+
+
+
+ List.sort list
+
+
+
+
+
+ + This is a stable sort, i.e. the original order of equal elements is preserved. +
+'T list
+ + The input list. +
+'T list
+ + The sorted list. +
++
let input = [8; 4; 3; 1; 6; 1]
+
+ List.sort input
+
+[1; 1 3; 4; 6; 8]
.
+
+
+
+
+
+
+ + Sorts the given list using keys given by the given projection. Keys are compared using Operators.compare. +
++ This is a stable sort, i.e. the original order of equal elements is preserved. +
+'T -> 'Key
+ + The function to transform the list elements into the type to be compared. +
+'T list
+ + The input list. +
+'T list
+ + The sorted list. +
++
let input = [ "a"; "bbb"; "cccc"; "dd" ]
+
+ input |> List.sortBy (fun s -> s.Length)
+
+["a"; "dd"; "bbb"; "cccc"]
.
+
+
+
+
+
+ List.sortByDescending projection list
+ 'T -> 'Key
+ -
+ The function to transform the list elements into the type to be compared.
+
+ 'T list
+ -
+ The input list.
+
+ 'T list
+
+ The sorted list.
+ + Sorts the given list in descending order using keys given by the given projection. Keys are compared using Operators.compare. +
++ This is a stable sort, i.e. the original order of equal elements is preserved. +
+'T -> 'Key
+ + The function to transform the list elements into the type to be compared. +
+'T list
+ + The input list. +
+'T list
+ + The sorted list. +
++
let input = ["a"; "bbb"; "cccc"; "dd"]
+
+ input |> List.sortByDescending (fun s -> s.Length)
+
+["cccc"; "bbb"; "dd"; "a"]
.
+
+
+
+
+
+
+ + This is a stable sort, i.e. the original order of equal elements is preserved. +
+'T list
+ + The input list. +
+'T list
+ + The sorted list. +
++
let input = [8; 4; 3; 1; 6; 1]
+
+ input |> List.sortDescending
+
+[8; 6; 4; 3; 1; 1]
.
+
+
+
+
+
+
+ + This is a stable sort, i.e. the original order of equal elements is preserved. +
+'T -> 'T -> int
+ + The function to compare the list elements. +
+'T list
+ + The input list. +
+'T list
+ + The sorted list. +
++ Sort a list of pairs using a comparison function that compares string lengths then index numbers: +
let compareEntries (n1: int, s1: string) (n2: int, s2: string) =
+ let c = compare s1.Length s2.Length
+ if c <> 0 then c else
+ compare n1 n2
+
+ let input = [ (0,"aa"); (1,"bbb"); (2,"cc"); (3,"dd") ]
+
+ input |> List.sortWith compareEntries
+
+[(0, "aa"); (2, "cc"); (3, "dd"); (1, "bbb")]
.
+
+
+
+
+
+
+ List.splitAt index list
+
+
+
+
+
+ int
+ + The index at which the list is split. +
+'T list
+ + The input list. +
++ + InvalidOperationException + + | ++ Thrown when split index exceeds the number of elements + in the list. + | +
+
let input = [8; 4; 3; 1; 6; 1]
+
+ let front, back = input |> List.splitAt 3
+
+front
to [8; 4; 3]
and back
to [1; 6; 1]
.
+
+
+ int
+ + The maximum number of chunks. +
+'T list
+ + The input list. +
++ + ArgumentException + + | +
+ Thrown when count is not positive.
+ |
+
+
[1..10] |> List.splitInto 2
+
+[[1; 2; 3; 4; 5]; [6; 7; 8; 9; 10]]
.
+
+
+ +
[1..10] |> List.splitInto 4
+
+[[1; 2; 3]; [4; 5; 6]; [7; 8]; [9; 10]]
.
+
+
+
+
+
+
+ List.sum list
+
+
+
+
+ List.sum list
+ ^T list
+ -
+ The input list.
+
+ ^T
+
+ The resulting sum.
+ ^T list
+ + The input list. +
+^T
+ + The resulting sum. +
++
let input = [ 1; 5; 3; 2 ]
+
+ input |> List.sum
+
+11
.
+
+
+
+
+
+ List.sumBy projection list
+ 'T -> ^U
+ -
+ The function to transform the list elements into the type to be summed.
+
+ 'T list
+ -
+ The input list.
+
+ ^U
+
+ The resulting sum.
+ + Returns the sum of the results generated by applying the function to each element of the list. +
+'T -> ^U
+ + The function to transform the list elements into the type to be summed. +
+'T list
+ + The input list. +
+^U
+ + The resulting sum. +
++
let input = [ "aa"; "bbb"; "cc" ]
+
+ input |> List.sumBy (fun s -> s.Length)
+
+7
.
+
+
+
+
+
+
+ List.tail list
+
+
+
+
+
+ 'T list
+ + The input list. +
+'T list
+ + The list after removing the first element. +
++ + ArgumentException + + | ++ Thrown when the list is empty. + | +
+
let inputs = ["a"; "bb"; "ccc"]
+
+ inputs |> List.tail
+
+["bb"; "ccc"]
+
+
+
+
+
+ List.take count list
+
+
+
+
+
+
+ Throws InvalidOperationException
+ if the count exceeds the number of elements in the list. List.truncate
+ returns as many items as the list contains instead of throwing an exception.
+
int
+ + The number of items to take. +
+'T list
+ + The input list. +
+'T list
+ + The result list. +
++ + ArgumentException + + | ++ Thrown when the input list is empty. + | +
+ + InvalidOperationException + + | ++ Thrown when count exceeds the number of elements + in the list. + | +
+
let inputs = ["a"; "b"; "c"; "d"]
+
+ inputs |> List.take 2
+
+["a"; "b"]
+
+ +
let inputs = ["a"; "b"; "c"; "d"]
+
+ inputs |> List.take 6
+
+InvalidOperationException
.
+
+
+ +
let inputs = ["a"; "b"; "c"; "d"]
+
+ inputs |> List.take 0
+
+
+
+
+
+ + Returns a list that contains all elements of the original list while the + given predicate returns True, and then returns no further elements. +
+'T -> bool
+ + A function that evaluates to false when no more items should be returned. +
+'T list
+ + The input list. +
+'T list
+ + The result list. +
++
let inputs = ["a"; "bb"; "ccc"; "d"]
+
+ inputs |> List.takeWhile (fun x -> x.Length < 3)
+
+["a"; "bb"]
+
+
+
+
+
+ List.toArray list
+
+
+
+
+ List.toArray list
+ 'T list
+ -
+ The input list.
+
+ 'T[]
+
+ The array containing the elements of the list.
+ 'T list
+ + The input list. +
+'T[]
+ + The array containing the elements of the list. +
++
let inputs = [ 1; 2; 5 ]
+
+ inputs |> List.toArray
+
+[| 1; 2; 5 |]
.
+
+
+
+
+
+
+ List.toSeq list
+
+
+
+
+
+ 'T list
+ + The input list. +
+'T seq
+ + The sequence of elements in the list. +
++
let inputs = [ 1; 2; 5 ]
+
+ inputs |> List.toSeq
+
+seq { 1; 2; 5 }
.
+
+
+ + + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+ + ArgumentException + + | ++ Thrown when the input lists differ in length. + | +
+
let inputs =
+ [ [ 10; 20; 30 ]
+ [ 11; 21; 31 ] ]
+
+ inputs |> List.transpose
+
+[ [10; 11]; [20; 21]; [30; 31] ]
.
+
+
+
+
+
+
+ int
+ + The maximum number of items to return. +
+'T list
+ + The input list. +
+'T list
+ + The result list. +
++
let inputs = ["a"; "b"; "c"; "d"]
+
+ inputs |> List.truncate 2
+
+["a"; "b"]
+
+ +
let inputs = ["a"; "b"; "c"; "d"]
+
+ inputs |> List.truncate 6
+
+["a"; "b"; "c"; "d"]
+
+ +
let inputs = ["a"; "b"; "c"; "d"]
+
+ inputs |> List.truncate 0
+
+
+
+
+
+ List.tryExactlyOne list
+
+
+
+
+
+
+ Returns the only element of the list or None
if it is empty or contains more than one element.
+
'T list
+ + The input list. +
+'T option
+ + The only element of the list or None. +
++
[1] |> List.tryExactlyOne // evaluates Some 1
+ [1;2] |> List.tryExactlyOne // evaluates None
+ ([] : int list) |> List.tryExactlyOne // evaluates None
+
+
+
+
+ List.tryFind predicate list
+ 'T -> bool
+ -
+ The function to test the input elements.
+
+ 'T list
+ -
+ The input list.
+
+ 'T option
+
+ The first element for which the predicate returns true, or None if
+ every element evaluates to false.
+ + Returns the first element for which the given function returns True. + Return None if no such element exists. +
+'T -> bool
+ + The function to test the input elements. +
+'T list
+ + The input list. +
+'T option
+ + The first element for which the predicate returns true, or None if + every element evaluates to false. +
++ Try to find the first even number: +
let inputs = [1; 2; 3]
+
+ inputs |> List.tryFind (fun elm -> elm % 2 = 0)
+
+Some 2
+
+ + Try to find the first even number: +
let inputs = [1; 5; 3]
+
+ inputs |> List.tryFind (fun elm -> elm % 2 = 0)
+
+None
+
+
+
+
+ List.tryFindBack predicate list
+ 'T -> bool
+ -
+ The function to test the input elements.
+
+ 'T list
+ -
+ The input list.
+
+ 'T option
+
+ The last element for which the predicate returns true, or None if
+ every element evaluates to false.
+ + Returns the last element for which the given function returns True. + Return None if no such element exists. +
+'T -> bool
+ + The function to test the input elements. +
+'T list
+ + The input list. +
+'T option
+ + The last element for which the predicate returns true, or None if + every element evaluates to false. +
++ Try to find the first even number from the back: +
let inputs = [1; 2; 3; 4; 5]
+
+ inputs |> List.tryFindBack (fun elm -> elm % 2 = 0)
+
+Some 4
+
+ + Try to find the first even number from the back: +
let inputs = [1; 5; 3]
+
+ inputs |> List.tryFindBack (fun elm -> elm % 2 = 0)
+
+None
+
+
+
+
+ List.tryFindIndex predicate list
+ 'T -> bool
+ -
+ The function to test the input elements.
+
+ 'T list
+ -
+ The input list.
+
+ int option
+
+ The index of the first element for which the predicate returns true, or None if
+ every element evaluates to false.
+
+ Returns the index of the first element in the list
+ that satisfies the given predicate.
+ Return None
if no such element exists.
+
'T -> bool
+ + The function to test the input elements. +
+'T list
+ + The input list. +
+int option
+ + The index of the first element for which the predicate returns true, or None if + every element evaluates to false. +
++ Try to find the index of the first even number: +
let inputs = [1; 2; 3; 4; 5]
+
+ inputs |> List.tryFindIndex (fun elm -> elm % 2 = 0)
+
+Some 1
+
+ + Try to find the index of the first even number: +
let inputs = [1; 3; 5; 7]
+
+ inputs |> List.tryFindIndex (fun elm -> elm % 2 = 0)
+
+None
+
+
+
+
+ List.tryFindIndexBack predicate list
+ 'T -> bool
+ -
+ The function to test the input elements.
+
+ 'T list
+ -
+ The input list.
+
+ int option
+
+ The index of the last element for which the predicate returns true, or None if
+ every element evaluates to false.
+
+ Returns the index of the last element in the list
+ that satisfies the given predicate.
+ Return None
if no such element exists.
+
'T -> bool
+ + The function to test the input elements. +
+'T list
+ + The input list. +
+int option
+ + The index of the last element for which the predicate returns true, or None if + every element evaluates to false. +
++ Try to find the index of the first even number from the back: +
let inputs = [1; 2; 3; 4; 5]
+
+ inputs |> List.tryFindIndexBack (fun elm -> elm % 2 = 0)
+
+Some 3
+
+ + Try to find the index of the first even number from the back: +
let inputs = [1; 3; 5; 7]
+
+ inputs |> List.tryFindIndexBack (fun elm -> elm % 2 = 0)
+
+None
+
+
+
+
+
+ List.tryHead list
+
+
+
+
+
+
+ Returns the first element of the list, or
+ None
if the list is empty.
+
'T list
+ + The input list. +
+'T option
+ + The first element of the list or None. +
++
let inputs = [ "banana"; "pear" ]
+
+ inputs |> List.tryHead
+
+Some "banana"
+
+ +
let inputs : int list = []
+
+ inputs |> List.tryHead
+
+None
+
+
+
+
+
+ List.tryItem index list
+
+
+
+
+
+
+ Tries to find the nth element in the list.
+ Returns None
if index is negative or the list does not contain enough elements.
+
int
+ + The index to retrieve. +
+'T list
+ + The input list. +
+'T option
+
+ The value at the given index or None
.
+
+
let inputs = ["a"; "b"; "c"]
+
+ inputs |> List.tryItem 1
+
+Some "b"
.
+
+
+ +
let inputs = ["a"; "b"; "c"]
+
+ inputs |> List.tryItem 4
+
+None
.
+
+
+
+
+
+
+ List.tryLast list
+
+
+
+
+
+
+ Returns the last element of the list.
+ Return None
if no such element exists.
+
'T list
+ + The input list. +
+'T option
+ + The last element of the list or None. +
++
[ "pear"; "banana" ] |> List.tryLast
+
+Some "banana"
+
+ +
[ ] |> List.tryLast
+
+None
+
+
+
+
+
+
+ Applies the given function to successive elements, returning Some(x)
the first
+ result where function returns Some(x)
for some x. If no such element
+ exists then return None
.
+
'T -> 'U option
+ + The function to generate options from the elements. +
+'T list
+ + The input list. +
+'U option
+ + The first resulting value or None. +
++
let input = [1; 2; 3]
+
+ input |> List.tryPick (fun n -> if n % 2 = 0 then Some (string n) else None)
+
+Some "2"
.
+
+
+ +
let input = [1; 2; 3]
+
+ input |> List.tryPick (fun n -> if n > 3 then Some (string n) else None)
+
+None
.
+
+
+
+
+
+ List.unfold generator state
+ 'State -> ('T * 'State) option
+ -
+ A function that takes in the current state and returns an option tuple of the next
+ element of the list and the next state value.
+
+ 'State
+ -
+ The initial state value.
+
+ 'T list
+
+ The result list.
+
+ Returns a list that contains the elements generated by the given computation.
+ The generator is repeatedly called to build the list until it returns None
.
+ The given initial state
argument is passed to the element generator.
+
'State -> ('T * 'State) option
+ + A function that takes in the current state and returns an option tuple of the next + element of the list and the next state value. +
+'State
+ + The initial state value. +
+'T list
+ + The result list. +
++
1 |> List.unfold (fun state -> if state > 100 then None else Some (state, state * 2))
+
+[1; 2; 4; 8; 16; 32; 64]
+
+
+
+
+
+ List.unzip list
+
+
+
+
+
+ ('T1 * 'T2) list
+ + The input list. +
++
let inputs = [(1, "one"); (2, "two")]
+
+ let numbers, names = inputs |> List.unzip
+
+numbers
to [1; 2]
and names
to ["one"; "two"]
.
+
+
+ ('T1 * 'T2 * 'T3) list
+ + The input list. +
++
let inputs = [(1, "one", "I"); (2, "two", "II")]
+
+ let numbers, names, roman = inputs |> List.unzip3
+
+numbers
to [1; 2]
, names
to ["one"; "two"]
and roman
to ["I"; "II"]
.
+
+
+
+
+
+
+ + Return a new list with the item at a given index set to the new value. +
+int
+ + The index of the item to be replaced. +
+'T
+ + The new value. +
+'T list
+ + The input list. +
+'T list
+ + The result list. +
++ + ArgumentException + + | ++ Thrown when index is outside 0..source.Length - 1 + | +
+
let inputs = [ 0; 1; 2 ]
+
+ inputs |> List.updateAt 1 9
+
+[ 0; 9; 2 ]
.
+
+
+
+
+
+ + Returns a new list containing only the elements of the list + for which the given predicate returns "true" +
+
+ This is identical to List.filter
.
+
'T -> bool
+ + The function to test the input elements. +
+'T list
+ + The input list. +
+'T list
+ + A list containing only the elements that satisfy the predicate. +
++ Select only the even numbers: +
let inputs = [1; 2; 3; 4]
+
+ inputs |> List.where (fun elm -> elm % 2 = 0)
+
+[2; 4]
+
+
+
+
+
+ + Returns a list of sliding windows containing elements drawn from the input + list. Each window is returned as a fresh list. +
+int
+ + The number of elements in each window. +
+'T list
+ + The input list. +
++ + ArgumentException + + | ++ Thrown when windowSize is not positive. + | +
+
let inputs = [1; 2; 3; 4; 5]
+
+ inputs |> List.windowed 3
+
+[[1; 2; 3]; [2; 3; 4]; [3; 4; 5]]
+
+
+
+
+
+ List.zip list1 list2
+
+
+
+
+ + Combines the two lists into a list of pairs. The two lists must have equal lengths. +
+'T1 list
+ + The first input list. +
+'T2 list
+ + The second input list. +
+('T1 * 'T2) list
+ + A single list containing pairs of matching elements from the input lists. +
++
let numbers = [1; 2]
+ let names = ["one"; "two"]
+
+ List.zip numbers names
+
+[(1, "one"); (2, "two")]
.
+
+
+
+
+
+ List.zip3 list1 list2 list3
+ 'T1 list
+ -
+ The first input list.
+
+ 'T2 list
+ -
+ The second input list.
+
+ 'T3 list
+ -
+ The third input list.
+
+ ('T1 * 'T2 * 'T3) list
+
+ A single list containing triples of matching elements from the input lists.
+ + Combines the three lists into a list of triples. The lists must have equal lengths. +
+'T1 list
+ + The first input list. +
+'T2 list
+ + The second input list. +
+'T3 list
+ + The third input list. +
+('T1 * 'T2 * 'T3) list
+ + A single list containing triples of matching elements from the input lists. +
++
let numbers = [1; 2]
+ let names = ["one"; "two"]
+ let roman = ["I"; "II"]
+
+ List.zip3 numbers names roman
+
+[(1, "one", "I"); (2, "two", "II")]
.
+
+
+ + Contains operations for working with values of type Map. +
++ Function or value + | ++ Description + | +||
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns a new map with the binding added to the given map. + If a binding with the given key already exists in the input map, the existing binding is replaced by the new binding in the result map. + + |
+ ||
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns a new map with the value stored under key changed according to f. + + |
+ ||
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+val sample: Map<int,string>
+Multiple items
+module Map + +from Microsoft.FSharp.Collections -------------------- type Map<'Key,'Value (requires comparison)> = + interface IReadOnlyDictionary<'Key,'Value> + interface IReadOnlyCollection<KeyValuePair<'Key,'Value>> + interface IEnumerable + interface IStructuralEquatable + interface IComparable + interface IEnumerable<KeyValuePair<'Key,'Value>> + interface ICollection<KeyValuePair<'Key,'Value>> + interface IDictionary<'Key,'Value> + new: elements: ('Key * 'Value) seq -> Map<'Key,'Value> + member Add: key: 'Key * value: 'Value -> Map<'Key,'Value> + ... -------------------- new: elements: ('Key * 'Value) seq -> Map<'Key,'Value> val containsKey: key: 'Key -> table: Map<'Key,'T> -> bool (requires comparison)
+
+
+
+ |
+ ||
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+val sample: Map<int,string>
+Multiple items
+module Map + +from Microsoft.FSharp.Collections -------------------- type Map<'Key,'Value (requires comparison)> = + interface IReadOnlyDictionary<'Key,'Value> + interface IReadOnlyCollection<KeyValuePair<'Key,'Value>> + interface IEnumerable + interface IStructuralEquatable + interface IComparable + interface IEnumerable<KeyValuePair<'Key,'Value>> + interface ICollection<KeyValuePair<'Key,'Value>> + interface IDictionary<'Key,'Value> + new: elements: ('Key * 'Value) seq -> Map<'Key,'Value> + member Add: key: 'Key * value: 'Value -> Map<'Key,'Value> + ... -------------------- new: elements: ('Key * 'Value) seq -> Map<'Key,'Value> val count: table: Map<'Key,'T> -> int (requires comparison)
+
+
+
+ |
+ ||
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+val emptyMap: Map<int,string>
+Multiple items
+module Map + +from Microsoft.FSharp.Collections -------------------- type Map<'Key,'Value (requires comparison)> = + interface IReadOnlyDictionary<'Key,'Value> + interface IReadOnlyCollection<KeyValuePair<'Key,'Value>> + interface IEnumerable + interface IStructuralEquatable + interface IComparable + interface IEnumerable<KeyValuePair<'Key,'Value>> + interface ICollection<KeyValuePair<'Key,'Value>> + interface IDictionary<'Key,'Value> + new: elements: ('Key * 'Value) seq -> Map<'Key,'Value> + member Add: key: 'Key * value: 'Value -> Map<'Key,'Value> + ... -------------------- new: elements: ('Key * 'Value) seq -> Map<'Key,'Value> val empty<'Key,'T (requires comparison)> : Map<'Key,'T> (requires comparison)
+Multiple items
+val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = + int Multiple items
+
+
+
+ val string: value: 'T -> string -------------------- type string = System.String |
+ ||
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Map.exists predicate table
+ + + Parameters: +
'Key -> 'T -> bool
+ -
+ The function to test the input elements.
+
+ + + + table + + : + Map<'Key, 'T>
+ -
+ The input map.
+
+ + + + Returns: + bool
+
+ True if the predicate returns true for one of the key/value pairs.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns true if the given predicate returns true for one of the + bindings in the map. + + |
+ ||
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Builds a new map containing only the bindings for which the given predicate returns 'true'. + + |
+ ||
+
+
+
+
+
+
+
+ Full Usage:
+
+ Map.find key table
+ + + Parameters: +
'Key
+ -
+ The input key.
+
+ + + + table + + : + Map<'Key, 'T>
+ -
+ The input map.
+
+ + + + Returns: + 'T
+
+ The value mapped to the given key.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Lookup an element in the map, raising |
+
+ + KeyNotFoundException + + | ++ Thrown when the key does not exist in the map. + | +
+
let sample = Map [ (1, "a"); (2, "b") ]
+
+ sample |> Map.find 1 // evaluates to "a"
+ sample |> Map.find 3 // throws KeyNotFoundException
+
+
+
+
+ Map.findKey predicate table
+ 'Key -> 'T -> bool
+ -
+ The function to test the input elements.
+
+ Map<'Key, 'T>
+ -
+ The input map.
+
+ 'Key
+
+ The first key for which the predicate evaluates true.
+
+ Evaluates the function on each mapping in the collection. Returns the key for the first mapping
+ where the function returns 'true'. Raise KeyNotFoundException
if no such element exists.
+
'Key -> 'T -> bool
+ + The function to test the input elements. +
+Map<'Key, 'T>
+ + The input map. +
+'Key
+ + The first key for which the predicate evaluates true. +
++ + KeyNotFoundException + + | ++ Thrown if the key does not exist in the map. + | +
+
let sample = Map [ (1, "a"); (2, "b") ]
+
+ sample |> Map.findKey (fun n s -> n = s.Length) // evaluates to 1
+ sample |> Map.findKey (fun n s -> n < s.Length) // throws KeyNotFoundException
+
+
+
+
+ Map.fold folder state table
+ 'State -> 'Key -> 'T -> 'State
+ -
+ The function to update the state given the input key/value pairs.
+
+ 'State
+ -
+ The initial state.
+
+ Map<'Key, 'T>
+ -
+ The input map.
+
+ 'State
+
+ The final state value.
+ 'State -> 'Key -> 'T -> 'State
+ + The function to update the state given the input key/value pairs. +
+'State
+ + The initial state. +
+Map<'Key, 'T>
+ + The input map. +
+'State
+ + The final state value. +
++
let sample = Map [ (1, "a"); (2, "b") ]
+
+ ("initial", sample) ||> Map.fold (fun state n s -> sprintf "%s %i %s" state n s)
+
+"initial 1 a 2 b"
.
+
+
+
+
+
+ Map.foldBack folder table state
+ 'Key -> 'T -> 'State -> 'State
+ -
+ The function to update the state given the input key/value pairs.
+
+ Map<'Key, 'T>
+ -
+ The input map.
+
+ 'State
+ -
+ The initial state.
+
+ 'State
+
+ The final state value.
+ 'Key -> 'T -> 'State -> 'State
+ + The function to update the state given the input key/value pairs. +
+Map<'Key, 'T>
+ + The input map. +
+'State
+ + The initial state. +
+'State
+ + The final state value. +
++
let sample = Map [ (1, "a"); (2, "b") ]
+
+ (sample, "initial") ||> Map.foldBack (fun n s state -> sprintf "%i %s %s" n s state)
+
+"1 a 2 b initial"
+
+
+
+
+ Map.forall predicate table
+ 'Key -> 'T -> bool
+ -
+ The function to test the input elements.
+
+ Map<'Key, 'T>
+ -
+ The input map.
+
+ bool
+
+ True if the predicate evaluates to true for all of the bindings in the map.
+ + Returns true if the given predicate returns true for all of the + bindings in the map. +
+'Key -> 'T -> bool
+ + The function to test the input elements. +
+Map<'Key, 'T>
+ + The input map. +
+bool
+ + True if the predicate evaluates to true for all of the bindings in the map. +
++
let sample = Map [ (1, "a"); (2, "b") ]
+
+ sample |> Map.forall (fun n s -> n >= s.Length) // evaluates to true
+ sample |> Map.forall (fun n s -> n = s.Length) // evaluates to false
+
+
+
+
+
+ Map.isEmpty table
+
+
+
+
+
+ Map<'Key, 'T>
+ + The input map. +
+bool
+ + True if the map is empty. +
++
let emptyMap = Map.empty<int, string>
+ emptyMap |> Map.isEmpty // evaluates to true
+
+ let notEmptyMap = Map [ (1, "a"); (2, "b") ]
+ emptyMap |> Map.isEmpty // evaluates to false
+
+
+
+
+
+ Map.iter action table
+
+
+
+
+
+ 'Key -> 'T -> unit
+ + The function to apply to each key/value pair. +
+Map<'Key, 'T>
+ + The input map. +
++
let sample = Map [ (1, "a"); (2, "b") ]
+
+ sample |> Map.iter (fun n s -> printf "%i %s " n s)
+
+"1 a 2 b "
.
+
+
+
+
+
+
+ Map.keys table
+
+
+
+
+ Map.keys table
+ Map<'Key, 'T>
+
+ ICollection<'Key>
+
+ + The keys in the map. + The sequence will be ordered by the keys of the map. +
+Map<'Key, 'T>
+ ICollection<'Key>
+ +
let sample = Map [ (1, "a"); (2, "b") ]
+
+ sample |> Map.keys // evaluates to seq [1; 2]
+
+
+
+
+
+ Map.map mapping table
+
+
+
+
+ Map.map mapping table
+ 'Key -> 'T -> 'U
+ -
+ The function to transform the key/value pairs.
+
+ Map<'Key, 'T>
+ -
+ The input map.
+
+ Map<'Key, 'U>
+
+ The resulting map of keys and transformed values.
+ + Builds a new collection whose elements are the results of applying the given function + to each of the elements of the collection. The key passed to the + function indicates the key of element being transformed. +
+'Key -> 'T -> 'U
+ + The function to transform the key/value pairs. +
+Map<'Key, 'T>
+ + The input map. +
+Map<'Key, 'U>
+ + The resulting map of keys and transformed values. +
++
let sample = Map [ (1, "a"); (2, "b") ]
+
+ sample |> Map.map (fun n s -> sprintf "%i %s" n s) // evaluates to map [(1, "1 a"); (2, "2 b")]
+
+
+
+
+
+ Map.maxKeyValue table
+
+
+
+
+ Map.maxKeyValue table
+ Map<'Key, 'T>
+ -
+ The input map.
+
+ 'Key * 'T
+
+
+ Returns binding for the largest key in the map.
+ Raise KeyNotFoundException
when map is empty.
+
Map<'Key, 'T>
+ + The input map. +
+'Key * 'T
+ + + KeyNotFoundException + + | ++ Thrown if the map is empty. + | +
+
let sample = Map [ (1, "a"); (2, "b") ]
+
+ sample |> Map.maxKeyValue // evaluates to (2, "b")
+
+
+
+
+
+ Map.minKeyValue table
+
+
+
+
+ Map.minKeyValue table
+ Map<'Key, 'T>
+ -
+ The input map.
+
+ 'Key * 'T
+
+
+ Returns binding for the smallest key in the map.
+ Raise KeyNotFoundException
when map is empty.
+
Map<'Key, 'T>
+ + The input map. +
+'Key * 'T
+ + + KeyNotFoundException + + | ++ Thrown if the map is empty. + | +
+
let sample = Map [ (1, "a"); (2, "b") ]
+
+ sample |> Map.minKeyValue // evaluates to (1, "a")
+
+
+
+
+
+ Map.ofArray elements
+
+
+
+
+ Map.ofArray elements
+ ('Key * 'T)[]
+ -
+ The input array of key/value pairs.
+
+ Map<'Key, 'T>
+
+ The resulting map.
+ ('Key * 'T)[]
+ + The input array of key/value pairs. +
+Map<'Key, 'T>
+ + The resulting map. +
++
let input = [| (1, "a"); (2, "b") |]
+
+ input |> Map.ofArray // evaluates to map [(1, "a"); (2, "b")]
+
+
+
+
+
+ Map.ofList elements
+
+
+
+
+
+ ('Key * 'T) list
+ + The input list of key/value pairs. +
+Map<'Key, 'T>
+ + The resulting map. +
++
let input = [ (1, "a"); (2, "b") ]
+
+ input |> Map.ofList // evaluates to map [(1, "a"); (2, "b")]
+
+
+
+
+
+ Map.ofSeq elements
+
+
+
+
+
+ ('Key * 'T) seq
+ + The input sequence of key/value pairs. +
+Map<'Key, 'T>
+ + The resulting map. +
++
let input = seq { (1, "a"); (2, "b") }
+
+ input |> Map.ofSeq // evaluates to map [(1, "a"); (2, "b")]
+
+
+
+
+ Map.partition predicate table
+ 'Key -> 'T -> bool
+ -
+ The function to test the input elements.
+
+ Map<'Key, 'T>
+ -
+ The input map.
+
+ Map<'Key, 'T> * Map<'Key, 'T>
+
+ A pair of maps in which the first contains the elements for which the predicate returned true
+ and the second containing the elements for which the predicated returned false.
+ + Builds two new maps, one containing the bindings for which the given predicate returns 'true', + and the other the remaining bindings. +
+'Key -> 'T -> bool
+ + The function to test the input elements. +
+Map<'Key, 'T>
+ + The input map. +
+Map<'Key, 'T> * Map<'Key, 'T>
+ + A pair of maps in which the first contains the elements for which the predicate returned true + and the second containing the elements for which the predicated returned false. +
++
let sample = Map [ (1, "a"); (2, "b") ]
+
+ sample |> Map.partition (fun n s -> n = s.Length) // evaluates to (map [(1, "a")], map [(2, "b")])
+
+
+
+
+
+ Map.pick chooser table
+
+
+
+
+
+
+ Searches the map looking for the first element where the given function returns a Some
value.
+ Raise KeyNotFoundException
if no such element exists.
+
'Key -> 'T -> 'U option
+ + The function to generate options from the key/value pairs. +
+Map<'Key, 'T>
+ + The input map. +
+'U
+ + The first result. +
++ + KeyNotFoundException + + | +
+ Thrown if no element returns a Some
+ value when evaluated by the chooser function
+ |
+
+
let sample = Map [ (1, "a"); (2, "b"); (10, "ccc"); (20, "ddd") ]
+
+ sample |> Map.pick (fun n s -> if n > 5 && s.Length > 2 then Some s else None)
+
+"ccc"
+
+ +
let sample = Map [ (1, "a"); (2, "b"); (10, "ccc"); (20, "ddd") ]
+
+ sample |> Map.pick (fun n s -> if n > 5 && s.Length > 4 then Some s else None)
+
+KeyNotFoundException
+
+
+
+
+
+ Map.remove key table
+
+
+
+
+
+ + Removes an element from the domain of the map. No exception is raised if the element is not present. +
+'Key
+ + The input key. +
+Map<'Key, 'T>
+ + The input map. +
+Map<'Key, 'T>
+ + The resulting map. +
++
let sample = Map [ (1, "a"); (2, "b") ]
+
+ sample |> Map.remove 1 // evaluates to map [(2, "b")]
+ sample |> Map.remove 3 // equal to sample
+
+
+
+
+
+ Map.toArray table
+
+
+
+
+ Map.toArray table
+ Map<'Key, 'T>
+ -
+ The input map.
+
+ ('Key * 'T)[]
+
+ The array of key/value pairs.
+ + Returns an array of all key-value pairs in the mapping. + The array will be ordered by the keys of the map. +
+Map<'Key, 'T>
+ + The input map. +
+('Key * 'T)[]
+ + The array of key/value pairs. +
++
let input = Map [ (1, "a"); (2, "b") ]
+
+ input |> Map.toArray // evaluates to [|(1, "a"); (2, "b")|]
+
+
+
+
+
+ Map.toList table
+
+
+
+
+
+ + Returns a list of all key-value pairs in the mapping. + The list will be ordered by the keys of the map. +
+Map<'Key, 'T>
+ + The input map. +
+('Key * 'T) list
+ + The list of key/value pairs. +
++
let input = Map [ (1, "a"); (2, "b") ]
+
+ input |> Map.toList // evaluates to [(1, "a"); (2, "b")]
+
+
+
+
+
+ Map.toSeq table
+
+
+
+
+
+ + Views the collection as an enumerable sequence of pairs. + The sequence will be ordered by the keys of the map. +
+Map<'Key, 'T>
+ + The input map. +
+('Key * 'T) seq
+ + The sequence of key/value pairs. +
++
let input = Map [ (1, "a"); (2, "b") ]
+
+ input |> Map.toSeq // evaluates to seq [(1, "a"); (2, "b")]
+
+
+
+
+
+ Map.tryFind key table
+
+
+
+
+
+
+ Lookup an element in the map, returning a Some
value if the element is in the domain
+ of the map and None
if not.
+
'Key
+ + The input key. +
+Map<'Key, 'T>
+ + The input map. +
+'T option
+
+ The found Some
value or None
.
+
+
let sample = Map [ (1, "a"); (2, "b") ]
+
+ sample |> Map.tryFind 1 // evaluates to Some "a"
+ sample |> Map.tryFind 3 // evaluates to None
+
+
+
+
+ Map.tryFindKey predicate table
+ 'Key -> 'T -> bool
+ -
+ The function to test the input elements.
+
+ Map<'Key, 'T>
+ -
+ The input map.
+
+ 'Key option
+
+ The first key for which the predicate returns true or None if the predicate evaluates to false for each key/value pair.
+ + Returns the key of the first mapping in the collection that satisfies the given predicate. + Returns 'None' if no such element exists. +
+'Key -> 'T -> bool
+ + The function to test the input elements. +
+Map<'Key, 'T>
+ + The input map. +
+'Key option
+ + The first key for which the predicate returns true or None if the predicate evaluates to false for each key/value pair. +
++
let sample = Map [ (1, "a"); (2, "b") ]
+
+ sample |> Map.tryFindKey (fun n s -> n = s.Length) // evaluates to Some 1
+ sample |> Map.tryFindKey (fun n s -> n < s.Length) // evaluates to None
+
+
+
+
+
+
+ Searches the map looking for the first element where the given function returns a Some
value.
+
'Key -> 'T -> 'U option
+ + The function to generate options from the key/value pairs. +
+Map<'Key, 'T>
+ + The input map. +
+'U option
+ + The first result. +
++
let sample = Map [ (1, "a"); (2, "b"); (10, "ccc"); (20, "ddd") ]
+
+ sample |> Map.tryPick (fun n s -> if n > 5 && s.Length > 2 then Some s else None)
+
+Some "ccc"
.
+
+
+ +
let sample = Map [ (1, "a"); (2, "b"); (10, "ccc"); (20, "ddd") ]
+
+ sample |> Map.tryPick (fun n s -> if n > 5 && s.Length > 4 then Some s else None)
+
+None
.
+
+
+
+
+
+
+ Map.values table
+
+
+
+
+ Map.values table
+ Map<'Key, 'T>
+
+ ICollection<'T>
+
+ + The values in the map, including the duplicates. + The sequence will be ordered by the keys of the map. +
+Map<'Key, 'T>
+ ICollection<'T>
+ +
let sample = Map [ (1, "a"); (2, "b") ]
+
+ sample |> Map.values // evaluates to seq ["a"; "b"]
+
++ An abbreviation for the CLI type IEnumerable +
++ + See the Seq module for further operations related to sequences. + + See also F# Language Guide - Sequences. + +
++ Contains operations for working with values of type seq. +
++ Function or value + | ++ Description + | +||||||
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns a new sequence that contains all pairings of elements from the first and second sequences. + + |
+
+ + ArgumentNullException + + | ++ Thrown when either of the input sequences is null. + | +
+
([1; 2], [3; 4]) ||> Seq.allPairs
+
+ seq { (1, 3); (1, 4); (2, 3); (2, 4) }
+
+
+
+
+
+ + Wraps the two given enumerations as a single concatenated + enumeration. +
++ The returned sequence may be passed between threads safely. However, + individual IEnumerator values generated from the returned sequence should not be accessed + concurrently. +
+'T seq
+ + The first sequence. +
+'T seq
+ + The second sequence. +
+'T seq
+ + The result sequence. +
++ + ArgumentNullException + + | ++ Thrown when either of the two provided sequences is + null. + | +
+
Seq.append [1; 2] [3; 4]
+
+seq { 1; 2; 3; 4 }
+
+
+
+
+
+ Seq.average source
+
+
+
+
+ Seq.average source
+ ^T seq
+ -
+ The input sequence.
+
+ ^T
+
+ The average.
+
+ The elements are averaged using the +
operator, DivideByInt
method and Zero
property
+ associated with the element type.
+
^T seq
+ + The input sequence. +
+^T
+ + The average. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+ + ArgumentException + + | ++ Thrown when the input sequence has zero elements. + | +
+
[1.0; 2.0; 3.0] |> Seq.average
+
+2.0
+
+ +
[] |> Seq.average
+
+ArgumentException
+
+
+
+
+ Seq.averageBy projection source
+ 'T -> ^U
+ -
+ A function applied to transform each element of the sequence.
+
+ 'T seq
+ -
+ The input sequence.
+
+ ^U
+
+ The average.
+ + Returns the average of the results generated by applying the function to each element + of the sequence. +
+
+ The elements are averaged using the +
operator, DivideByInt
method and Zero
property
+ associated with the generated type.
+
'T -> ^U
+ + A function applied to transform each element of the sequence. +
+'T seq
+ + The input sequence. +
+^U
+ + The average. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+ + ArgumentException + + | ++ Thrown when the input sequence has zero elements. + | +
+
type Foo = { Bar: float }
+
+ let input = seq { {Bar = 2.0}; {Bar = 4.0} }
+
+ input |> Seq.averageBy (fun foo -> foo.Bar)
+
+3.0
+
+ +
type Foo = { Bar: float }
+
+ Seq.empty |> Seq.averageBy (fun (foo: Foo) -> foo.Bar)
+
+ArgumentException
+
+
+
+
+
+ Seq.cache source
+
+
+
+
+
+ + Returns a sequence that corresponds to a cached version of the input sequence. +
++ + The result sequence will have the same elements as the input sequence. The result + can be enumerated multiple times. The input sequence will be enumerated at most + once and only as far as is necessary. Caching a sequence is typically useful when repeatedly + evaluating items in the original sequence is computationally expensive or if + iterating the sequence causes side-effects that the user does not want to be + repeated multiple times. + + Enumeration of the result sequence is thread safe in the sense that multiple independent IEnumerator + values may be used simultaneously from different threads (accesses to + the internal lookaside table are thread safe). Each individual IEnumerator + is not typically thread safe and should not be accessed concurrently. + + Once enumeration of the input sequence has started, + it's enumerator will be kept live by this object until the enumeration has completed. + At that point, the enumerator will be disposed. + + The enumerator may be disposed and underlying cache storage released by + converting the returned sequence object to type IDisposable, and calling the Dispose method + on this object. The sequence object may then be re-enumerated and a fresh enumerator will + be used. +
+'T seq
+ + The input sequence. +
+'T seq
+ + The result sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
let fibSeq =(0, 1) |> Seq.unfold (fun (a,b) -> Some(a + b, (b, a + b)))
+
+ let fibSeq3 = fibSeq |> Seq.take 3 |> Seq.cache
+ fibSeq3
+
+seq { 1; 2; 3 }
,
+ and it will not do the calculation again when called.
+
+
+
+
+
+
+ Seq.cast source
+
+
+
+
+ Seq.cast source
+ IEnumerable
+ -
+ The input sequence.
+
+ 'T seq
+
+ The result sequence.
+ + Wraps a loosely-typed System.Collections sequence as a typed sequence. +
++ The use of this function usually requires a type annotation. + An incorrect type annotation may result in runtime type + errors. + Individual IEnumerator values generated from the returned sequence should not be accessed concurrently. +
+IEnumerable
+ + The input sequence. +
+'T seq
+ + The result sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
[box 1; box 2; box 3] |> Seq.cast<int>
+
+seq { 1; 2; 3 }
, explicitly typed as seq<int>
.
+
+
+
+
+
+ + Applies the given function to each element of the sequence. Returns + a sequence comprised of the results "x" for each element where + the function returns Some(x). +
++ The returned sequence may be passed between threads safely. However, + individual IEnumerator values generated from the returned sequence should not + be accessed concurrently. +
+'T -> 'U option
+ + A function to transform items of type T into options of type U. +
+'T seq
+ + The input sequence of type T. +
+'U seq
+ + The result sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
[Some 1; None; Some 2] |> Seq.choose id
+
+seq { 1; 2 }
+
+ +
[1; 2; 3] |> Seq.choose (fun n -> if n % 2 = 0 then Some n else None)
+
+seq { 2 }
+
+
+
+
+
+ int
+ + The maximum size of each chunk. +
+'T seq
+ + The input sequence. +
+'T[] seq
+ + The sequence divided into chunks. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+ + ArgumentException + + | +
+ Thrown when chunkSize is not positive.
+ |
+
+
[1; 2; 3] |> Seq.chunkBySize 2
+
+seq { [|1; 2|]; [|3|] }
+
+ +
[1; 2; 3] |> Seq.chunkBySize -2
+
+ArgumentException
+
+
+
+
+ Seq.collect mapping source
+ 'T -> 'Collection
+ -
+ A function to transform elements of the input sequence into the sequences
+ that will then be concatenated.
+
+ 'T seq
+ -
+ The input sequence.
+
+ 'U seq
+
+ The result sequence.
+ + Applies the given function to each element of the sequence and concatenates all the + results. +
++ Remember sequence is lazy, effects are delayed until it is enumerated. +
+'T -> 'Collection
+ + A function to transform elements of the input sequence into the sequences + that will then be concatenated. +
+'T seq
+ + The input sequence. +
+'U seq
+ + The result sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
type Foo = { Bar: int seq }
+
+ let input = seq { {Bar = [1; 2]}; {Bar = [3; 4]} }
+
+ input |> Seq.collect (fun foo -> foo.Bar)
+
+seq { 1; 2; 3; 4 }
+
+ +
let input = [[1; 2]; [3; 4]]
+
+ input |> Seq.collect id
+
+seq { 1; 2; 3; 4 }
+
+
+
+
+ Seq.compareWith comparer source1 source2
+ 'T -> 'T -> int
+ -
+ A function that takes an element from each sequence and returns an int.
+ If it evaluates to a non-zero value iteration is stopped and that value is returned.
+
+ 'T seq
+ -
+ The first input sequence.
+
+ 'T seq
+ -
+ The second input sequence.
+
+ int
+
+ Returns the first non-zero result from the comparison function. If the end of a sequence
+ is reached it returns a -1 if the first sequence is shorter and a 1 if the second sequence
+ is shorter.
+ + Compares two sequences using the given comparison function, element by element. +
+'T -> 'T -> int
+ + A function that takes an element from each sequence and returns an int. + If it evaluates to a non-zero value iteration is stopped and that value is returned. +
+'T seq
+ + The first input sequence. +
+'T seq
+ + The second input sequence. +
+int
+ + Returns the first non-zero result from the comparison function. If the end of a sequence + is reached it returns a -1 if the first sequence is shorter and a 1 if the second sequence + is shorter. +
++ + ArgumentNullException + + | ++ Thrown when either of the input sequences + is null. + | +
+
let closerToNextDozen a b =
+ (a % 12).CompareTo(b % 12)
+
+ let input1 = [1; 10]
+ let input2 = [1; 10]
+
+ (input1, input2) ||> Seq.compareWith closerToNextDozen
+
+0
+
+ +
let closerToNextDozen a b =
+ (a % 12).CompareTo(b % 12)
+
+ let input1 = [1; 5]
+ let input2 = [1; 8]
+
+ (input1, input2) ||> Seq.compareWith closerToNextDozen
+
+-1
+
+ +
let closerToNextDozen a b =
+ (a % 12).CompareTo(b % 12)
+
+ let input1 = [1; 11]
+ let input2 = [1; 13]
+
+ (input1, input2) ||> Seq.compareWith closerToNextDozen
+
+1
+
+ +
let closerToNextDozen a b =
+ (a % 12).CompareTo(b % 12)
+
+ let input1 = [1; 2]
+ let input2 = [1]
+
+ (input1, input2) ||> Seq.compareWith closerToNextDozen
+
+1
+
+ +
let closerToNextDozen a b =
+ (a % 12).CompareTo(b % 12)
+
+ let input1 = [1]
+ let input2 = [1; 2]
+
+ (input1, input2) ||> Seq.compareWith closerToNextDozen
+
+-1
+
+
+
+
+
+ Seq.concat sources
+
+
+
+
+
+ + Combines the given enumeration-of-enumerations as a single concatenated + enumeration. +
++ The returned sequence may be passed between threads safely. However, + individual IEnumerator values generated from the returned sequence should not be accessed concurrently. +
+'Collection seq
+ + The input enumeration-of-enumerations. +
+'T seq
+ + The result sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
let inputs = [[1; 2]; [3]; [4; 5]]
+
+ inputs |> Seq.concat
+
+seq { 1; 2; 3; 4; 5 }
+
+
+
+
+ Seq.contains value source
+ 'T
+ -
+ The value to locate in the input sequence.
+
+ 'T seq
+ -
+ The input sequence.
+
+ bool
+
+ True if the input sequence contains the specified element; false otherwise.
+ 'T
+ + The value to locate in the input sequence. +
+'T seq
+ + The input sequence. +
+bool
+ + True if the input sequence contains the specified element; false otherwise. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
[1; 2] |> Seq.contains 2 // evaluates to true
+ [1; 2] |> Seq.contains 5 // evaluates to false
+
+
+
+
+ Seq.countBy projection source
+ 'T -> 'Key
+ -
+ A function transforming each item of the input sequence into a key to be
+ compared against the others.
+
+ 'T seq
+ -
+ The input sequence.
+
+ ('Key * int) seq
+
+ The result sequence.
+ + Applies a key-generating function to each element of a sequence and returns a sequence yielding unique + keys and their number of occurrences in the original sequence. +
++ Note that this function returns a sequence that digests the whole initial sequence as soon as + that sequence is iterated. As a result this function should not be used with + large or infinite sequences. The function makes no assumption on the ordering of the original + sequence. +
+'T -> 'Key
+ + A function transforming each item of the input sequence into a key to be + compared against the others. +
+'T seq
+ + The input sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
type Foo = { Bar: string }
+
+ let inputs = [{Bar = "a"}; {Bar = "b"}; {Bar = "a"}]
+
+ inputs |> Seq.countBy (fun foo -> foo.Bar)
+
+seq { ("a", 2); ("b", 1) }
+
+
+
+
+
+ Seq.delay generator
+
+
+
+
+
+ + Returns a sequence that is built from the given delayed specification of a + sequence. +
++ The input function is evaluated each time an IEnumerator for the sequence + is requested. +
+ +'T seq
+ + The result sequence. +
++
Seq.delay (fun () -> Seq.ofList [1; 2; 3])
+
+seq { 1; 2; 3 }
, executing
+ the generator function every time is consumed.
+
+
+
+
+
+
+ Seq.distinct source
+
+
+
+
+
+ + Returns a sequence that contains no duplicate entries according to generic hash and + equality comparisons on the entries. + If an element occurs multiple times in the sequence then the later occurrences are discarded. +
+'T seq
+ + The input sequence. +
+'T seq
+ + The result sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
[1; 1; 2; 3] |> Seq.distinct
+
+seq { 1; 2; 3 }
+
+
+
+
+
+ + Returns a sequence that contains no duplicate entries according to the + generic hash and equality comparisons on the keys returned by the given key-generating function. + If an element occurs multiple times in the sequence then the later occurrences are discarded. +
+'T -> 'Key
+ + A function transforming the sequence items into comparable keys. +
+'T seq
+ + The input sequence. +
+'T seq
+ + The result sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
let inputs = [{Bar = 1 };{Bar = 1}; {Bar = 2}; {Bar = 3}]
+
+ inputs |> Seq.distinctBy (fun foo -> foo.Bar)
+
+seq { { Bar = 1 }; { Bar = 2 }; { Bar = 3 } }
+
+
+
+
+
+ Seq.empty
+
+
+
+
+
+
+
+
+ Seq.exactlyOne source
+
+
+
+
+ Seq.exactlyOne source
+ 'T seq
+ -
+ The input sequence.
+
+ 'T
+
+ The only element of the sequence.
+ 'T seq
+ + The input sequence. +
+'T
+ + The only element of the sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+ + ArgumentException + + | ++ Thrown when the input does not have precisely one element. + | +
+
let inputs = ["banana"]
+
+ inputs |> Seq.exactlyOne
+
+banana
+
+ +
let inputs = ["pear"; "banana"]
+
+ inputs |> Seq.exactlyOne
+
+ArgumentException
+
+ +
[] |> Seq.exactlyOne
+
+ArgumentException
+
+
+
+
+ Seq.except itemsToExclude source
+ 'T seq
+ -
+ A sequence whose elements that also occur in the second sequence will cause those elements to be
+ removed from the returned sequence.
+
+ 'T seq
+ -
+ A sequence whose elements that are not also in first will be returned.
+
+ 'T seq
+
+ A sequence that contains the set difference of the elements of two sequences.
+ + Returns a new sequence with the distinct elements of the second sequence which do not appear in the first sequence, + using generic hash and equality comparisons to compare values. +
++ Note that this function returns a sequence that digests the whole of the first input sequence as soon as + the result sequence is iterated. As a result this function should not be used with + large or infinite sequences in the first parameter. The function makes no assumption on the ordering of the first input + sequence. +
+'T seq
+ + A sequence whose elements that also occur in the second sequence will cause those elements to be + removed from the returned sequence. +
+'T seq
+ + A sequence whose elements that are not also in first will be returned. +
+'T seq
+ + A sequence that contains the set difference of the elements of two sequences. +
++ + ArgumentNullException + + | ++ Thrown when either of the two input sequences is null. + | +
+
let original = [1; 2; 3; 4; 5]
+ let itemsToExclude = [1; 3; 5]
+
+ original |> Seq.except itemsToExclude
+
+seq { 2; 4 }
+
+
+
+
+ Seq.exists predicate source
+ 'T -> bool
+ -
+ A function to test each item of the input sequence.
+
+ 'T seq
+ -
+ The input sequence.
+
+ bool
+
+ True if any result from the predicate is true; false otherwise.
+ + The predicate is applied to the elements of the input sequence. If any application + returns true then the overall result is true and no further elements are tested. + Otherwise, false is returned. +
+'T -> bool
+ + A function to test each item of the input sequence. +
+'T seq
+ + The input sequence. +
+bool
+ + True if any result from the predicate is true; false otherwise. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
let input = [1; 2; 3; 4; 5]
+
+ input |> Seq.exists (fun elm -> elm % 4 = 0)
+
+true
+
+ +
let input = [1; 2; 3; 4; 5]
+
+ input |> Seq.exists (fun elm -> elm % 6 = 0)
+
+false
+
+
+
+
+ Seq.exists2 predicate source1 source2
+ 'T1 -> 'T2 -> bool
+ -
+ A function to test each pair of items from the input sequences.
+
+ 'T1 seq
+ -
+ The first input sequence.
+
+ 'T2 seq
+ -
+ The second input sequence.
+
+ bool
+
+ True if any result from the predicate is true; false otherwise.
+ + Tests if any pair of corresponding elements of the input sequences satisfies the given predicate. +
++ The predicate is applied to matching elements in the two sequences up to the lesser of the + two lengths of the collections. If any application returns true then the overall result is + true and no further elements are tested. Otherwise, false is returned. If one sequence is shorter than + the other then the remaining elements of the longer sequence are ignored. +
+'T1 -> 'T2 -> bool
+ + A function to test each pair of items from the input sequences. +
+'T1 seq
+ + The first input sequence. +
+'T2 seq
+ + The second input sequence. +
+bool
+ + True if any result from the predicate is true; false otherwise. +
++ + ArgumentNullException + + | ++ Thrown when either of the two input sequences is null. + | +
+
let inputs1 = [1; 2]
+ let inputs2 = [1; 2; 0]
+
+ (inputs1, inputs2) ||> Seq.exists2 (fun a b -> a > b)
+
+false
+
+ +
let inputs1 = [1; 4]
+ let inputs2 = [1; 3; 5]
+
+ (inputs1, inputs2) ||> Seq.exists2 (fun a b -> a > b)
+
+true
+
+
+
+
+ Seq.filter predicate source
+ 'T -> bool
+ -
+ A function to test whether each item in the input sequence should be included in the output.
+
+ 'T seq
+ -
+ The input sequence.
+
+ 'T seq
+
+ The result sequence.
+ + Returns a new collection containing only the elements of the collection + for which the given predicate returns "true". This is a synonym for Seq.where. +
++ The returned sequence may be passed between threads safely. However, + individual IEnumerator values generated from the returned sequence should not be accessed concurrently. + + Remember sequence is lazy, effects are delayed until it is enumerated. +
+'T -> bool
+ + A function to test whether each item in the input sequence should be included in the output. +
+'T seq
+ + The input sequence. +
+'T seq
+ + The result sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
let inputs = [1; 2; 3; 4]
+
+ inputs |> Seq.filter (fun elm -> elm % 2 = 0)
+
+seq { 2; 4 }
+
+
+
+
+ Seq.find predicate source
+ 'T -> bool
+ -
+ A function to test whether an item in the sequence should be returned.
+
+ 'T seq
+ -
+ The input sequence.
+
+ 'T
+
+ The first element for which the predicate returns True.
+ + Returns the first element for which the given function returns True. +
+'T -> bool
+ + A function to test whether an item in the sequence should be returned. +
+'T seq
+ + The input sequence. +
+'T
+ + The first element for which the predicate returns True. +
++ + KeyNotFoundException + + | ++ Thrown if no element returns true when + evaluated by the predicate + | +
+ + ArgumentNullException + + | ++ Thrown when the input sequence is null + | +
+
let inputs = [1; 2; 3]
+
+ inputs |> Seq.find (fun elm -> elm % 2 = 0)
+
+2
+
+ +
let inputs = [1; 2; 3]
+
+ inputs |> Seq.find (fun elm -> elm % 6 = 0)
+
+KeyNotFoundException
+
+
+
+
+ Seq.findBack predicate source
+ 'T -> bool
+ -
+ A function to test whether an item in the sequence should be returned.
+
+ 'T seq
+ -
+ The input sequence.
+
+ 'T
+
+ The last element for which the predicate returns True.
+ + This function digests the whole initial sequence as soon as it is called. As a + result this function should not be used with large or infinite sequences. +
+'T -> bool
+ + A function to test whether an item in the sequence should be returned. +
+'T seq
+ + The input sequence. +
+'T
+ + The last element for which the predicate returns True. +
++ + KeyNotFoundException + + | ++ Thrown if no element returns true when + evaluated by the predicate + | +
+ + ArgumentNullException + + | ++ Thrown when the input sequence is null + | +
+
let inputs = [2; 3; 4]
+
+ inputs |> Seq.findBack (fun elm -> elm % 2 = 0)
+
+4
+
+ +
let inputs = [2; 3; 4]
+
+ inputs |> Seq.findBack (fun elm -> elm % 6 = 0)
+
+KeyNotFoundException
+
+
+
+
+ Seq.findIndex predicate source
+ 'T -> bool
+ -
+ A function to test whether the index of a particular element should be returned.
+
+ 'T seq
+ -
+ The input sequence.
+
+ int
+
+ The index of the first element for which the predicate returns True.
+ + Returns the index of the first element for which the given function returns True. +
+'T -> bool
+ + A function to test whether the index of a particular element should be returned. +
+'T seq
+ + The input sequence. +
+int
+ + The index of the first element for which the predicate returns True. +
++ + KeyNotFoundException + + | ++ Thrown if no element returns true when + evaluated by the predicate + | +
+ + ArgumentNullException + + | ++ Thrown when the input sequence is null + | +
+
let inputs = [1; 2; 3; 4; 5]
+
+ inputs |> Seq.findIndex (fun elm -> elm % 2 = 0)
+
+1
+
+ +
let inputs = [1; 2; 3; 4; 5]
+ inputs |> Seq.findIndex (fun elm -> elm % 6 = 0)
+
+KeyNotFoundException
+
+
+
+
+ Seq.findIndexBack predicate source
+ 'T -> bool
+ -
+ A function to test whether the index of a particular element should be returned.
+
+ 'T seq
+ -
+ The input sequence.
+
+ int
+
+ The index of the last element for which the predicate returns True.
+ + Returns the index of the last element for which the given function returns True. +
++ This function digests the whole initial sequence as soon as it is called. As a + result this function should not be used with large or infinite sequences. +
+'T -> bool
+ + A function to test whether the index of a particular element should be returned. +
+'T seq
+ + The input sequence. +
+int
+ + The index of the last element for which the predicate returns True. +
++ + KeyNotFoundException + + | ++ Thrown if no element returns true when + evaluated by the predicate + | +
+ + ArgumentNullException + + | ++ Thrown when the input sequence is null + | +
+
let input = [1; 2; 3; 4; 5]
+
+ input |> Seq.findIndex (fun elm -> elm % 2 = 0)
+
+3
+
+ +
let input = [1; 2; 3; 4; 5]
+
+ input |> Seq.findIndex (fun elm -> elm % 6 = 0)
+
+KeyNotFoundException
+
+
+
+
+ Seq.fold folder state source
+ 'State -> 'T -> 'State
+ -
+ A function that updates the state with each element from the sequence.
+
+ 'State
+ -
+ The initial state.
+
+ 'T seq
+ -
+ The input sequence.
+
+ 'State
+
+ The state object after the folding function is applied to each element of the sequence.
+
+ Applies a function to each element of the collection, threading an accumulator argument
+ through the computation. If the input function is f
and the elements are i0...iN
+ then computes f (... (f s i0)...) iN
+
'State -> 'T -> 'State
+ + A function that updates the state with each element from the sequence. +
+'State
+ + The initial state. +
+'T seq
+ + The input sequence. +
+'State
+ + The state object after the folding function is applied to each element of the sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
type Charge =
+ | In of int
+ | Out of int
+
+ let inputs = [In 1; Out 2; In 3]
+
+ (0, inputs) ||> Seq.fold (fun acc charge ->
+ match charge with
+ | In i -> acc + i
+ | Out o -> acc - o)
+
+2
+
+
+
+
+ Seq.fold2 folder state source1 source2
+ 'State -> 'T1 -> 'T2 -> 'State
+ -
+ The function to update the state given the input elements.
+
+ 'State
+ -
+ The initial state.
+
+ 'T1 seq
+ -
+ The first input sequence.
+
+ 'T2 seq
+ -
+ The second input sequence.
+
+ 'State
+
+ The final state value.
+ + Applies a function to corresponding elements of two collections, threading an accumulator argument + through the computation. +
+
+ The two sequences need not have equal lengths:
+ when one sequence is exhausted any remaining elements in the other sequence are ignored.
+ If the input function is f
and the elements are i0...iN
and j0...jN
+ then computes f (... (f s i0 j0)...) iN jN
.
+
'State -> 'T1 -> 'T2 -> 'State
+ + The function to update the state given the input elements. +
+'State
+ + The initial state. +
+'T1 seq
+ + The first input sequence. +
+'T2 seq
+ + The second input sequence. +
+'State
+ + The final state value. +
++ + ArgumentNullException + + | ++ Thrown when the either of the input sequences is null. + | +
+
type CoinToss = Head | Tails
+
+ let data1 = [Tails; Head; Tails]
+ let data2 = [Tails; Head; Head]
+
+ (0, data1, data2) |||> Seq.fold2 (fun acc a b ->
+ match (a, b) with
+ | Head, Head -> acc + 1
+ | Tails, Tails -> acc + 1
+ | _ -> acc - 1)
+
+1
+
+
+
+
+ Seq.foldBack folder source state
+ 'T -> 'State -> 'State
+ -
+ The function to update the state given the input elements.
+
+ 'T seq
+ -
+ The input sequence.
+
+ 'State
+ -
+ The initial state.
+
+ 'State
+
+ The state object after the folding function is applied to each element of the sequence.
+
+ Applies a function to each element of the collection, starting from the end, threading an accumulator argument
+ through the computation. If the input function is f
and the elements are i0...iN
+ then computes f i0 (... (f iN s)...)
+
+ This function consumes the whole input sequence before returning the result. +
+'T -> 'State -> 'State
+ + The function to update the state given the input elements. +
+'T seq
+ + The input sequence. +
+'State
+ + The initial state. +
+'State
+ + The state object after the folding function is applied to each element of the sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
type Count =
+ { Positive: int
+ Negative: int
+ Text: string }
+
+ let sequence = [1; 0; -1; -2; 3]
+ let initialState = {Positive = 0; Negative = 0; Text = ""}
+
+ (sequence, initialState) ||> Seq.foldBack (fun a acc ->
+ let text = acc.Text + " " + string a
+ if a >= 0 then
+ { acc with
+ Positive = acc.Positive + 1
+ Text = text }
+ else
+ { acc with
+ Negative = acc.Negative + 1
+ Text = text })
+
+ { Positive = 2
+ Negative = 3
+ Text = " 3 -2 -1 0 1" }
+
+
+
+
+
+
+
+ Seq.foldBack2 folder source1 source2 state
+ 'T1 -> 'T2 -> 'State -> 'State
+ -
+ The function to update the state given the input elements.
+
+ 'T1 seq
+ -
+ The first input sequence.
+
+ 'T2 seq
+ -
+ The second input sequence.
+
+ 'State
+ -
+ The initial state.
+
+ 'State
+
+ The final state value.
+
+ Applies a function to corresponding elements of two collections, starting from the end of the shorter collection,
+ threading an accumulator argument through the computation. The two sequences need not have equal lengths.
+ If the input function is f
and the elements are i0...iN
and j0...jM
, N < M
+ then computes f i0 j0 (... (f iN jN s)...)
.
+
+ + This function consumes the whole of both inputs sequences before returning the result. As a + result this function should not be used with large or infinite sequences. + +
+'T1 -> 'T2 -> 'State -> 'State
+ + The function to update the state given the input elements. +
+'T1 seq
+ + The first input sequence. +
+'T2 seq
+ + The second input sequence. +
+'State
+ + The initial state. +
+'State
+ + The final state value. +
++ + ArgumentNullException + + | ++ Thrown when the either of the input sequences is null. + | +
+
type Count =
+ { Positive: int
+ Negative: int
+ Text: string }
+
+ let inputs1 = [-1; -2; -3]
+ let inputs2 = [3; 2; 1; 0]
+ let initialState = {Positive = 0; Negative = 0; Text = ""}
+
+ (inputs1, inputs2, initialState) |||> Seq.foldBack2 (fun a b acc ->
+ let text = acc.Text + "(" + string a + "," + string b + ") "
+ if a + b >= 0 then
+ { acc with
+ Positive = acc.Positive + 1
+ Text = text }
+ else
+ { acc with
+ Negative = acc.Negative + 1
+ Text = text }
+ )
+
+ { Positive = 2
+ Negative = 1
+ Text = " (-3,1) (-2,2) (-1,3)" }
+
+
+
+
+
+
+
+ Seq.forall predicate source
+ 'T -> bool
+ -
+ A function to test an element of the input sequence.
+
+ 'T seq
+ -
+ The input sequence.
+
+ bool
+
+ True if every element of the sequence satisfies the predicate; false otherwise.
+ + The predicate is applied to the elements of the input sequence. If any application + returns false then the overall result is false and no further elements are tested. + Otherwise, true is returned. +
+'T -> bool
+ + A function to test an element of the input sequence. +
+'T seq
+ + The input sequence. +
+bool
+ + True if every element of the sequence satisfies the predicate; false otherwise. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
let isEven a = a % 2 = 0
+
+ [2; 42] |> Seq.forall isEven // evaluates to true
+
+ [1; 2] |> Seq.forall isEven // evaluates to false
+
+
+
+
+ Seq.forall2 predicate source1 source2
+ 'T1 -> 'T2 -> bool
+ -
+ A function to test pairs of elements from the input sequences.
+
+ 'T1 seq
+ -
+ The first input sequence.
+
+ 'T2 seq
+ -
+ The second input sequence.
+
+ bool
+
+ True if all pairs satisfy the predicate; false otherwise.
+ + Tests the all pairs of elements drawn from the two sequences satisfy the + given predicate. If one sequence is shorter than + the other then the remaining elements of the longer sequence are ignored. +
+'T1 -> 'T2 -> bool
+ + A function to test pairs of elements from the input sequences. +
+'T1 seq
+ + The first input sequence. +
+'T2 seq
+ + The second input sequence. +
+bool
+ + True if all pairs satisfy the predicate; false otherwise. +
++ + ArgumentNullException + + | ++ Thrown when either of the input sequences is null. + | +
+
let inputs1 = [1; 2; 3; 4; 5; 6]
+ let inputs2 = [1; 2; 3; 4; 5]
+
+ (inputs1, inputs2) ||> Seq.forall2 (=)
+
+true
.
+
+
+ +
let items1 = [2017; 1; 1]
+ let items2 = [2019; 19; 8]
+
+ (items1, items2) ||> Seq.forall2 (=)
+
+false
.
+
+
+
+
+
+ Seq.groupBy projection source
+ 'T -> 'Key
+ -
+ A function that transforms an element of the sequence into a comparable key.
+
+ 'T seq
+ -
+ The input sequence.
+
+ ('Key * 'T seq) seq
+
+ The result sequence.
+ + Applies a key-generating function to each element of a sequence and yields a sequence of + unique keys. Each unique key contains a sequence of all elements that match + to this key. +
++ This function returns a sequence that digests the whole initial sequence as soon as + that sequence is iterated. As a result this function should not be used with + large or infinite sequences. The function makes no assumption on the ordering of the original + sequence. +
+'T -> 'Key
+ + A function that transforms an element of the sequence into a comparable key. +
+'T seq
+ + The input sequence. +
++
let inputs = [1; 2; 3; 4; 5]
+
+ inputs |> Seq.groupBy (fun n -> n % 2)
+
+seq { (1, seq { 1; 3; 5 }); (0, seq { 2; 4 }) }
+
+
+
+
+
+ Seq.head source
+
+
+
+
+ Seq.head source
+ 'T seq
+ -
+ The input sequence.
+
+ 'T
+
+ The first element of the sequence.
+ 'T seq
+ + The input sequence. +
+'T
+ + The first element of the sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+ + ArgumentException + + | ++ Thrown when the input does not have any elements. + | +
+
let inputs = ["banana"; "pear"]
+
+ inputs |> Seq.head
+
+banana
+
+ +
[] |> Seq.head
+
+ArgumentException
+
+
+
+
+
+ Seq.indexed source
+
+
+
+
+
+ + Builds a new collection whose elements are the corresponding elements of the input collection + paired with the integer index (from 0) of each element. +
+'T seq
+ + The input sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
["a"; "b"; "c"] |> Seq.indexed
+
+seq { (0, "a"); (1, "b"); (2, "c") }
+
+
+
+
+ Seq.init count initializer
+ int
+ -
+ The maximum number of items to generate for the sequence.
+
+ int -> 'T
+ -
+ A function that generates an item in the sequence from a given index.
+
+ 'T seq
+
+ The result sequence.
+ + Generates a new sequence which, when iterated, will return successive + elements by calling the given function, up to the given count. Each element is saved after its + initialization. The function is passed the index of the item being + generated. +
++ The returned sequence may be passed between threads safely. However, + individual IEnumerator values generated from the returned sequence should not be accessed concurrently. +
+int
+ + The maximum number of items to generate for the sequence. +
+int -> 'T
+ + A function that generates an item in the sequence from a given index. +
+'T seq
+ + The result sequence. +
++ + ArgumentException + + | ++ Thrown when count is negative. + | +
+
Seq.init 4 (fun v -> v + 5)
+
+seq { 5; 6; 7; 8 }
+
+ +
Seq.init -5 (fun v -> v + 5)
+
+ArgumentException
+
+
+
+
+
+ + Generates a new sequence which, when iterated, will return successive + elements by calling the given function. The results of calling the function + will not be saved, that is the function will be reapplied as necessary to + regenerate the elements. The function is passed the index of the item being + generated. +
+
+ The returned sequence may be passed between threads safely. However,
+ individual IEnumerator values generated from the returned sequence should not be accessed concurrently.
+ Iteration can continue up to Int32.MaxValue
.
+
int -> 'T
+ + A function that generates an item in the sequence from a given index. +
+'T seq
+ + The result sequence. +
++
(+) 5 |> Seq.initInfinite
+
+seq { 5; 6; 7; 8; ... }
+
+
+
+
+ Seq.insertAt index value source
+ int
+ -
+ The index where the item should be inserted.
+
+ 'T
+ -
+ The value to insert.
+
+ 'T seq
+ -
+ The input sequence.
+
+ 'T seq
+
+ The result sequence.
+ + Return a new sequence with a new item inserted before the given index. +
+int
+ + The index where the item should be inserted. +
+'T
+ + The value to insert. +
+'T seq
+ + The input sequence. +
+'T seq
+ + The result sequence. +
++ + ArgumentException + + | ++ Thrown when index is below 0 or greater than source.Length. + | +
+
seq { 0; 1; 2 } |> Seq.insertAt 1 9
+
+seq { 0; 9; 1; 2 }
.
+
+
+
+
+
+ Seq.insertManyAt index values source
+ int
+ -
+ The index where the items should be inserted.
+
+ 'T seq
+ -
+ The values to insert.
+
+ 'T seq
+ -
+ The input sequence.
+
+ 'T seq
+
+ The result sequence.
+ + Return a new sequence with new items inserted before the given index. +
+int
+ + The index where the items should be inserted. +
+'T seq
+ + The values to insert. +
+'T seq
+ + The input sequence. +
+'T seq
+ + The result sequence. +
++ + ArgumentException + + | ++ Thrown when index is below 0 or greater than source.Length. + | +
+
seq { 0; 1; 2 } |> Seq.insertManyAt 1 [8; 9]
+
+seq { 0; 8; 9; 1; 2 }
.
+
+
+
+
+
+
+ Seq.isEmpty source
+
+
+
+
+
+ 'T seq
+ + The input sequence. +
+bool
+ + True if the sequence is empty; false otherwise. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
[] |> Seq.isEmpty
+
+true
+
+ +
["pear"; "banana"] |> Seq.isEmpty
+
+false
+
+
+
+
+
+ Seq.item index source
+
+
+
+
+
+ int
+ + The index of the element to retrieve. +
+'T seq
+ + The input sequence. +
+'T
+ + The element at the specified index of the sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+ + ArgumentException + + | ++ Thrown when the index is negative or the input sequence does not contain enough elements. + | +
+
let inputs = ["a"; "b"; "c"]
+
+ inputs |> Seq.item 1
+
+"b"
+
+ +
let inputs = ["a"; "b"; "c"]
+
+ inputs |> Seq.item 4
+
+ArgumentException
+
+
+
+
+
+ Seq.iter action source
+
+
+
+
+
+ 'T -> unit
+ + A function to apply to each element of the sequence. +
+'T seq
+ + The input sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
["a"; "b"; "c"] |> Seq.iter (printfn "%s")
+
+unit
and prints
+ a
+ b
+ c
+
+
+
+ in the console.
+
+
+
+
+
+ Seq.iter2 action source1 source2
+ 'T1 -> 'T2 -> unit
+ -
+ A function to apply to each pair of elements from the input sequences.
+
+ 'T1 seq
+ -
+ The first input sequence.
+
+ 'T2 seq
+ -
+ The second input sequence.
+
+ + Applies the given function to two collections simultaneously. If one sequence is shorter than + the other then the remaining elements of the longer sequence are ignored. +
+'T1 -> 'T2 -> unit
+ + A function to apply to each pair of elements from the input sequences. +
+'T1 seq
+ + The first input sequence. +
+'T2 seq
+ + The second input sequence. +
++ + ArgumentNullException + + | ++ Thrown when either of the input sequences is null. + | +
+
let inputs1 = ["a"; "b"; "c"]
+ let inputs2 = [1; 2; 3]
+
+ (inputs1, inputs2) ||> Seq.iter2 (printfn "%s: %i")
+
+unit
and prints
+ a: 1
+ b: 2
+ c: 3
+
+
+
+ in the console.
+
+
+
+
+
+
+ Seq.iteri action source
+
+
+
+
+
+ + Applies the given function to each element of the collection. The integer passed to the + function indicates the index of element. +
+int -> 'T -> unit
+ + A function to apply to each element of the sequence that can also access the current index. +
+'T seq
+ + The input sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
let inputs = ["a"; "b"; "c"]
+
+ inputs |> Seq.iteri (fun i v -> printfn "{i}: {v}")
+
+unit
and prints
+ 0: a
+ 1: b
+ 2: c
+
+
+
+ in the console.
+
+
+
+
+
+ Seq.iteri2 action source1 source2
+ int -> 'T1 -> 'T2 -> unit
+ -
+ A function to apply to each pair of elements from the input sequences along with their index.
+
+ 'T1 seq
+ -
+ The first input sequence.
+
+ 'T2 seq
+ -
+ The second input sequence.
+
+ + Applies the given function to two collections simultaneously. If one sequence is shorter than + the other then the remaining elements of the longer sequence are ignored. The integer passed to the + function indicates the index of element. +
+int -> 'T1 -> 'T2 -> unit
+ + A function to apply to each pair of elements from the input sequences along with their index. +
+'T1 seq
+ + The first input sequence. +
+'T2 seq
+ + The second input sequence. +
++ + ArgumentNullException + + | ++ Thrown when either of the input sequences is null. + | +
+
let inputs1 = ["a"; "b"; "c"]
+ let inputs2 = ["banana"; "pear"; "apple"]
+
+ (inputs1, inputs2) ||> Seq.iteri2 (fun i s1 s2 -> printfn "Index {i}: {s1} - {s2}")
+
+unit
and prints
+ Index 0: a - banana
+ Index 1: b - pear
+ Index 2: c - apple
+
+
+
+ in the console.
+
+
+
+
+
+
+ Seq.last source
+
+
+
+
+ Seq.last source
+ 'T seq
+ -
+ The input sequence.
+
+ 'T
+
+ The last element of the sequence.
+ 'T seq
+ + The input sequence. +
+'T
+ + The last element of the sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+ + ArgumentException + + | ++ Thrown when the input does not have any elements. + | +
+
["pear"; "banana"] |> Seq.last
+
+banana
+
+ +
[] |> Seq.last
+
+ArgumentException
+
+
+
+
+
+ Seq.length source
+
+
+
+
+
+ 'T seq
+ + The input sequence. +
+int
+ + The length of the sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
let inputs = ["a"; "b"; "c"]
+
+ inputs |> Seq.length
+
+3
+
+
+
+
+
+ Seq.map mapping source
+
+
+
+
+
+
+ Builds a new collection whose elements are the results of applying the given function
+ to each of the elements of the collection. The given function will be applied
+ as elements are demanded using the MoveNext
method on enumerators retrieved from the
+ object.
+
+ The returned sequence may be passed between threads safely. However, + individual IEnumerator values generated from the returned sequence should not be accessed concurrently. +
+'T -> 'U
+ + A function to transform items from the input sequence. +
+'T seq
+ + The input sequence. +
+'U seq
+ + The result sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
let inputs = ["a"; "bbb"; "cc"]
+
+ inputs |> Seq.map (fun x -> x.Length)
+
+seq { 1; 3; 2 }
+
+
+
+
+ Seq.map2 mapping source1 source2
+ 'T1 -> 'T2 -> 'U
+ -
+ A function to transform pairs of items from the input sequences.
+
+ 'T1 seq
+ -
+ The first input sequence.
+
+ 'T2 seq
+ -
+ The second input sequence.
+
+ 'U seq
+
+ The result sequence.
+ + Builds a new collection whose elements are the results of applying the given function + to the corresponding pairs of elements from the two sequences. If one input sequence is shorter than + the other then the remaining elements of the longer sequence are ignored. +
+'T1 -> 'T2 -> 'U
+ + A function to transform pairs of items from the input sequences. +
+'T1 seq
+ + The first input sequence. +
+'T2 seq
+ + The second input sequence. +
+'U seq
+ + The result sequence. +
++ + ArgumentNullException + + | ++ Thrown when either of the input sequences is null. + | +
+
let inputs1 = ["a"; "bad"; "good"]
+ let inputs2 = [0; 2; 1]
+
+ (inputs1, inputs2) ||> Seq.map2 (fun x y -> x.[y])
+
+seq { 'a'; 'd'; 'o' }
+
+
+
+
+ Seq.map3 mapping source1 source2 source3
+ 'T1 -> 'T2 -> 'T3 -> 'U
+ -
+ The function to transform triples of elements from the input sequences.
+
+ 'T1 seq
+ -
+ The first input sequence.
+
+ 'T2 seq
+ -
+ The second input sequence.
+
+ 'T3 seq
+ -
+ The third input sequence.
+
+ 'U seq
+
+ The result sequence.
+ + Builds a new collection whose elements are the results of applying the given function + to the corresponding triples of elements from the three sequences. If one input sequence if shorter than + the others then the remaining elements of the longer sequences are ignored. +
+'T1 -> 'T2 -> 'T3 -> 'U
+ + The function to transform triples of elements from the input sequences. +
+'T1 seq
+ + The first input sequence. +
+'T2 seq
+ + The second input sequence. +
+'T3 seq
+ + The third input sequence. +
+'U seq
+ + The result sequence. +
++ + ArgumentNullException + + | ++ Thrown when any of the input sequences is null. + | +
+
let inputs1 = [ "a"; "t"; "ti" ]
+ let inputs2 = [ "l"; "h"; "m" ]
+ let inputs3 = [ "l"; "e"; "e" ]
+
+ (inputs1, inputs2, inputs3) |||> Seq.map3 (fun x y z -> x + y + z)
+
+seq { "all"; "the"; "time" }
+
+
+
+
+ Seq.mapFold mapping state source
+ 'State -> 'T -> 'Result * 'State
+ -
+ The function to transform elements from the input collection and accumulate the final value.
+
+ 'State
+ -
+ The initial state.
+
+ 'T seq
+ -
+ The input collection.
+
+ 'Result seq * 'State
+
+ The collection of transformed elements, and the final accumulated value.
+ + Combines map and fold. Builds a new collection whose elements are the results of applying the given function + to each of the elements of the collection. The function is also used to accumulate a final value. +
++ This function digests the whole initial sequence as soon as it is called. As a result this function should + not be used with large or infinite sequences. +
+'State -> 'T -> 'Result * 'State
+ + The function to transform elements from the input collection and accumulate the final value. +
+'State
+ + The initial state. +
+'T seq
+ + The input collection. +
+'Result seq * 'State
+ + The collection of transformed elements, and the final accumulated value. +
++ + ArgumentNullException + + | ++ Thrown when the input collection is null. + | +
+
Accumulate the charges, and double them as well
+ type Charge =
+ | In of int
+ | Out of int
+
+ let inputs = seq { In 1; Out 2; In 3 }
+
+ let newCharges, balance =
+ (0, inputs) ||> Seq.mapFold (fun acc charge ->
+ match charge with
+ | In i -> In (i*2), acc + i
+ | Out o -> Out (o*2), acc - o)
+
+newCharges
to seq { In 2; Out 4; In 6 }
and balance
to 2
.
+
+
+
+
+
+ Seq.mapFoldBack mapping source state
+ 'T -> 'State -> 'Result * 'State
+ -
+ The function to transform elements from the input collection and accumulate the final value.
+
+ 'T seq
+ -
+ The input collection.
+
+ 'State
+ -
+ The initial state.
+
+ 'Result seq * 'State
+
+ The collection of transformed elements, and the final accumulated value.
+ + Combines map and foldBack. Builds a new collection whose elements are the results of applying the given function + to each of the elements of the collection. The function is also used to accumulate a final value. +
++ This function digests the whole initial sequence as soon as it is called. As a result this function should + not be used with large or infinite sequences. +
+'T -> 'State -> 'Result * 'State
+ + The function to transform elements from the input collection and accumulate the final value. +
+'T seq
+ + The input collection. +
+'State
+ + The initial state. +
+'Result seq * 'State
+ + The collection of transformed elements, and the final accumulated value. +
++ + ArgumentNullException + + | ++ Thrown when the input collection is null. + | +
+ Accumulate the charges from back to front, and double them as well +
type Charge =
+ | In of int
+ | Out of int
+
+ let inputs = seq { In 1; Out 2; In 3 }
+
+ let newCharges, balance =
+ (inputs, 0) ||> Seq.mapFoldBack (fun charge acc ->
+ match charge with
+ | In i -> In (i*2), acc + i
+ | Out o -> Out (o*2), acc - o)
+
+newCharges
to seq { In 2; Out 4; In 6 }
and balance
to 2
.
+
+
+
+
+
+
+ Seq.mapi mapping source
+
+
+
+
+ Seq.mapi mapping source
+ int -> 'T -> 'U
+ -
+ A function to transform items from the input sequence that also supplies the current index.
+
+ 'T seq
+ -
+ The input sequence.
+
+ 'U seq
+
+ The result sequence.
+ + Builds a new collection whose elements are the results of applying the given function + to each of the elements of the collection. The integer index passed to the + function indicates the index (from 0) of element being transformed. +
+int -> 'T -> 'U
+ + A function to transform items from the input sequence that also supplies the current index. +
+'T seq
+ + The input sequence. +
+'U seq
+ + The result sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
let inputs = [ 10; 10; 10 ]
+
+ inputs |> Seq.mapi (fun i x -> i + x)
+
+seq { 10; 11; 12 }
+
+
+
+
+ Seq.mapi2 mapping source1 source2
+ int -> 'T1 -> 'T2 -> 'U
+ -
+ A function to transform pairs of items from the input sequences that also supplies the current index.
+
+ 'T1 seq
+ -
+ The first input sequence.
+
+ 'T2 seq
+ -
+ The second input sequence.
+
+ 'U seq
+
+ The result sequence.
+ + Builds a new collection whose elements are the results of applying the given function + to the corresponding pairs of elements from the two sequences. If one input sequence is shorter than + the other then the remaining elements of the longer sequence are ignored. The integer index passed to the + function indicates the index (from 0) of element being transformed. +
+int -> 'T1 -> 'T2 -> 'U
+ + A function to transform pairs of items from the input sequences that also supplies the current index. +
+'T1 seq
+ + The first input sequence. +
+'T2 seq
+ + The second input sequence. +
+'U seq
+ + The result sequence. +
++ + ArgumentNullException + + | ++ Thrown when either of the input sequences is null. + | +
+
let inputs1 = ["a"; "bad"; "good"]
+ let inputs2 = [0; 2; 1]
+
+ (inputs1, inputs2) ||> Seq.mapi2 (fun i x y -> i, x[y])
+
+seq { (0, 'a'); (1, 'd'); (2, 'o') }
+
+
+
+
+
+ Seq.max source
+
+
+
+
+ Seq.max source
+ 'T seq
+ -
+ The input sequence.
+
+ 'T
+
+ The largest element of the sequence.
+ + Returns the greatest of all elements of the sequence, compared via Operators.max +
+'T seq
+ + The input sequence. +
+'T
+ + The largest element of the sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+ + ArgumentException + + | ++ Thrown when the input sequence is empty. + | +
+
let inputs = [ 10; 12; 11 ]
+
+ inputs |> Seq.max
+
+12
+
+ +
let inputs = [ ]
+
+ inputs |> Seq.max
+
+System.ArgumentException
.
+
+
+
+
+
+ Seq.maxBy projection source
+ 'T -> 'U
+ -
+ A function to transform items from the input sequence into comparable keys.
+
+ 'T seq
+ -
+ The input sequence.
+
+ 'T
+
+ The largest element of the sequence.
+ + Returns the greatest of all elements of the sequence, compared via Operators.max on the function result. +
+'T -> 'U
+ + A function to transform items from the input sequence into comparable keys. +
+'T seq
+ + The input sequence. +
+'T
+ + The largest element of the sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+ + ArgumentException + + | ++ Thrown when the input sequence is empty. + | +
+
let inputs = ["aaa"; "b"; "cccc"]
+
+ inputs |> Seq.maxBy (fun s -> s.Length)
+
+"cccc"
+
+ +
let inputs = [ ]
+
+ inputs |> Seq.maxBy (fun s -> s.Length)
+
+System.ArgumentException
.
+
+
+
+
+
+
+ Seq.min source
+
+
+
+
+ Seq.min source
+ 'T seq
+ -
+ The input sequence.
+
+ 'T
+
+ The smallest element of the sequence.
+
+ Returns the lowest of all elements of the sequence, compared via Operators.min
.
+
'T seq
+ + The input sequence. +
+'T
+ + The smallest element of the sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+ + ArgumentException + + | ++ Thrown when the input sequence is empty. + | +
+
let inputs = [10; 12; 11]
+
+ inputs |> Seq.min
+
+10
+
+ +
let inputs = []
+
+ inputs |> Seq.min
+
+System.ArgumentException
.
+
+
+
+
+
+ Seq.minBy projection source
+ 'T -> 'U
+ -
+ A function to transform items from the input sequence into comparable keys.
+
+ 'T seq
+ -
+ The input sequence.
+
+ 'T
+
+ The smallest element of the sequence.
+ + Returns the lowest of all elements of the sequence, compared via Operators.min on the function result. +
+'T -> 'U
+ + A function to transform items from the input sequence into comparable keys. +
+'T seq
+ + The input sequence. +
+'T
+ + The smallest element of the sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+ + ArgumentException + + | ++ Thrown when the input sequence is empty. + | +
+
let inputs = [ "aaa"; "b"; "cccc" ]
+
+ inputs |> Seq.minBy (fun s -> s.Length)
+
+"b"
+
+ +
let inputs = []
+
+ inputs |> Seq.minBy (fun (s: string) -> s.Length)
+
+System.ArgumentException
.
+
+
+
+
+
+
+ Seq.ofArray source
+
+
+
+
+ Seq.ofArray source
+ 'T[]
+ -
+ The input array.
+
+ 'T seq
+
+ The result sequence.
+ 'T[]
+ + The input array. +
+'T seq
+ + The result sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
let inputs = [| 1; 2; 5 |]
+
+ inputs |> Seq.ofArray
+
+seq { 1; 2; 5 }
.
+
+
+
+
+
+
+ Seq.ofList source
+
+
+
+
+
+ 'T list
+ + The input list. +
+'T seq
+ + The result sequence. +
++
let inputs = [ 1; 2; 5 ]
+
+ inputs |> Seq.ofList
+
+seq { 1; 2; 5 }
.
+
+
+
+
+
+
+ Seq.pairwise source
+
+
+
+
+
+ + Returns a sequence of each element in the input sequence and its predecessor, with the + exception of the first element which is only returned as the predecessor of the second element. +
+'T seq
+ + The input sequence. +
+('T * 'T) seq
+ + The result sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
let inputs = seq { 1; 2; 3; 4 }
+
+ inputs |> Seq.pairwise
+
+seq { (1, 2); (2, 3); (3, 4) }
.
+
+
+
+
+
+
+ + Returns a sequence with all elements permuted according to the + specified permutation. +
++ This function consumes the whole input sequence before yielding the first element of the result sequence. +
+int -> int
+ + The function that maps input indices to output indices. +
+'T seq
+ + The input sequence. +
+'T seq
+ + The result sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+ + ArgumentException + + | ++ Thrown when indexMap does not produce a valid permutation. + | +
+
let inputs = [1; 2; 3; 4]
+
+ inputs |> Seq.permute (fun x -> (x + 1) % 4)
+
+seq { 4; 1; 2; 3 }
.
+
+
+
+
+
+
+ Seq.pick chooser source
+
+
+
+
+ Seq.pick chooser source
+ 'T -> 'U option
+ -
+ A function to transform each item of the input sequence into an option of the output type.
+
+ 'T seq
+ -
+ The input sequence.
+
+ 'U
+
+ The selected element.
+
+ Applies the given function to successive elements, returning the first
+ x
where the function returns "Some(x)".
+
'T -> 'U option
+ + A function to transform each item of the input sequence into an option of the output type. +
+'T seq
+ + The input sequence. +
+'U
+ + The selected element. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+ + KeyNotFoundException + + | +
+ Thrown when every item of the sequence
+ evaluates to None when the given function is applied.
+ |
+
+
let input = [1; 2; 3]
+
+ input |> Seq.pick (fun n -> if n % 2 = 0 then Some (string n) else None)
+
+"2"
.
+
+
+ +
let input = [1; 2; 3]
+
+ input |> Seq.pick (fun n -> if n > 3 = 0 then Some (string n) else None)
+
+KeyNotFoundException
.
+
+
+
+
+
+
+ Seq.readonly source
+
+
+
+
+
+ + Builds a new sequence object that delegates to the given sequence object. This ensures + the original sequence cannot be rediscovered and mutated by a type cast. For example, + if given an array the returned sequence will return the elements of the array, but + you cannot cast the returned sequence object to an array. +
+'T seq
+ + The input sequence. +
+'T seq
+ + The result sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
let input = [| 1; 2; 3 |]
+
+ input |> Seq.readonly
+
+seq { 1; 2; 3 }
.
+
+
+ +
let input = [| 1; 2; 3 |]
+
+ let readonlyView = input |> Seq.readonly
+
+ (readonlyView :?> int[]).[1] <- 4
+
+InvalidCastException
.
+
+
+
+
+
+ Seq.reduce reduction source
+ 'T -> 'T -> 'T
+ -
+ A function that takes in the current accumulated result and the next
+ element of the sequence to produce the next accumulated result.
+
+ 'T seq
+ -
+ The input sequence.
+
+ 'T
+
+ The final result of the reduction function.
+ + Applies a function to each element of the sequence, threading an accumulator argument + through the computation. Begin by applying the function to the first two elements. + Then feed this result into the function along with the third element and so on. + Return the final result. +
+'T -> 'T -> 'T
+ + A function that takes in the current accumulated result and the next + element of the sequence to produce the next accumulated result. +
+'T seq
+ + The input sequence. +
+'T
+ + The final result of the reduction function. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+ + ArgumentException + + | ++ Thrown when the input sequence is empty. + | +
+
let inputs = [1; 3; 4; 2]
+
+ inputs |> Seq.reduce (fun a b -> a * 10 + b)
+
+1342
, by computing ((1 * 10 + 3) * 10 + 4) * 10 + 2
+
+
+
+
+ Seq.reduceBack reduction source
+ 'T -> 'T -> 'T
+ -
+ A function that takes in the next-to-last element of the sequence and the
+ current accumulated result to produce the next accumulated result.
+
+ 'T seq
+ -
+ The input sequence.
+
+ 'T
+
+ The final result of the reductions.
+
+ Applies a function to each element of the sequence, starting from the end, threading an accumulator argument
+ through the computation. If the input function is f
and the elements are i0...iN
+ then computes f i0 (...(f iN-1 iN))
.
+
+ This function consumes the whole input sequence before returning the result. +
+'T -> 'T -> 'T
+ + A function that takes in the next-to-last element of the sequence and the + current accumulated result to produce the next accumulated result. +
+'T seq
+ + The input sequence. +
+'T
+ + The final result of the reductions. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+ + ArgumentException + + | ++ Thrown when the input sequence is empty. + | +
+
let inputs = [1; 3; 4; 2]
+
+ inputs |> Seq.reduceBack (fun a b -> a + b * 10)
+
+2431
, by computing 1 + (3 + (4 + 2 * 10) * 10) * 10
+
+
+
+
+
+ int
+ + The index of the item to be removed. +
+'T seq
+ + The input sequence. +
+'T seq
+ + The result sequence. +
++ + ArgumentException + + | ++ Thrown when index is outside 0..source.Length - 1 + | +
+
seq { 0; 1; 2 } |> Seq.removeAt 1
+
+seq { 0; 2 }
.
+
+
+
+
+
+ Seq.removeManyAt index count source
+ int
+ -
+ The index of the item to be removed.
+
+ int
+ -
+ The number of items to remove.
+
+ 'T seq
+ -
+ The input sequence.
+
+ 'T seq
+
+ The result sequence.
+ + Return a new sequence with the number of items starting at a given index removed. +
+int
+ + The index of the item to be removed. +
+int
+ + The number of items to remove. +
+'T seq
+ + The input sequence. +
+'T seq
+ + The result sequence. +
++ + ArgumentException + + | ++ Thrown when index is outside 0..source.Length - count + | +
+
seq { 0; 1; 2; 3 } |> Seq.removeManyAt 1 2
+
+seq { 0; 3 }
.
+
+
+
+
+
+
+ int
+ + The number of elements to replicate. +
+'T
+ + The value to replicate +
+'T seq
+ + The generated sequence. +
++
Seq.replicate 3 "a"
+
+seq { "a"; "a"; "a" }
.
+
+
+
+
+
+
+ Seq.rev source
+
+
+
+
+
+ + This function consumes the whole input sequence before yielding the first element of the reversed sequence. +
+'T seq
+ + The input sequence. +
+'T seq
+ + The reversed sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
let input = seq { 0; 1; 2 }
+
+ input |> Seq.rev
+
+seq { 2; 1; 0 }
.
+
+
+
+
+
+ Seq.scan folder state source
+ 'State -> 'T -> 'State
+ -
+ A function that updates the state with each element from the sequence.
+
+ 'State
+ -
+ The initial state.
+
+ 'T seq
+ -
+ The input sequence.
+
+ 'State seq
+
+ The resulting sequence of computed states.
+ + Like fold, but computes on-demand and returns the sequence of intermediary and final results. +
+'State -> 'T -> 'State
+ + A function that updates the state with each element from the sequence. +
+'State
+ + The initial state. +
+'T seq
+ + The input sequence. +
+'State seq
+ + The resulting sequence of computed states. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+ Apply a list charges and collect the running balances as each is applied: +
type Charge =
+ | In of int
+ | Out of int
+
+ let inputs = seq { In 1; Out 2; In 3 }
+
+ (0, inputs) ||> Seq.scan (fun acc charge ->
+ match charge with
+ | In i -> acc + i
+ | Out o -> acc - o)
+
+seq { 0; 1; -1; 2 }
. Note 0
is the intial
+ state, 1
the next state, -1
the next state, and 2
the final state.
+
+
+
+
+
+ Seq.scanBack folder source state
+ 'T -> 'State -> 'State
+ -
+ A function that updates the state with each element from the sequence.
+
+ 'T seq
+ -
+ The input sequence.
+
+ 'State
+ -
+ The initial state.
+
+ 'State seq
+
+ The resulting sequence of computed states.
+
+ Like foldBack
, but returns the sequence of intermediary and final results.
+
+ This function returns a sequence that digests the whole initial sequence as soon as that + sequence is iterated. As a result this function should not be used with large or infinite sequences. + +
+'T -> 'State -> 'State
+ + A function that updates the state with each element from the sequence. +
+'T seq
+ + The input sequence. +
+'State
+ + The initial state. +
+'State seq
+ + The resulting sequence of computed states. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+ Apply a list charges from back to front, and collect the running balances as each is applied: +
type Charge =
+ | In of int
+ | Out of int
+
+ let inputs = [ In 1; Out 2; In 3 ]
+
+ (inputs, 0) ||> Seq.scanBack (fun charge acc ->
+ match charge with
+ | In i -> acc + i
+ | Out o -> acc - o)
+
+seq { 2; 1; 3; 0 }
by processing each input from back to front. Note 0
is the intial
+ state, 3
the next state, 1
the next state, and 2
the final state, and the states
+ are produced from back to front.
+
+
+
+
+
+
+ Seq.singleton value
+
+
+
+
+ Seq.singleton value
+ 'T
+ -
+ The input item.
+
+ 'T seq
+
+ The result sequence of one item.
+ 'T
+ + The input item. +
+'T seq
+ + The result sequence of one item. +
++
Seq.singleton 7
+
+seq { 7 }
.
+
+
+
+
+
+
+ Seq.skip count source
+
+
+
+
+
+ + Returns a sequence that skips N elements of the underlying sequence and then yields the + remaining elements of the sequence. +
+int
+ + The number of items to skip. +
+'T seq
+ + The input sequence. +
+'T seq
+ + The result sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+ + InvalidOperationException + + | ++ Thrown when count exceeds the number of elements + in the sequence. + | +
+
let inputs = ["a"; "b"; "c"; "d"]
+
+ inputs |> Seq.skip 2
+
+seq { "c"; "d" }
+
+ +
let inputs = ["a"; "b"; "c"; "d"]
+
+ inputs |> Seq.skip 5
+
+ArgumentException
.
+
+
+ +
let inputs = ["a"; "b"; "c"; "d"]
+
+ inputs |> Seq.skip -1
+
+seq { "a"; "b"; "c"; "d" }
.
+
+
+
+
+
+ + Returns a sequence that, when iterated, skips elements of the underlying sequence while the + given predicate returns True, and then yields the remaining elements of the sequence. +
+'T -> bool
+ + A function that evaluates an element of the sequence to a boolean value. +
+'T seq
+ + The input sequence. +
+'T seq
+ + The result sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
let inputs = seq { "a"; "bbb"; "cc"; "d" }
+
+ inputs |> Seq.skipWhile (fun x -> x.Length < 3)
+
+seq { "bbb"; "cc"; "d" }
+
+
+
+
+
+ Seq.sort source
+
+
+
+
+
+ + This function returns a sequence that digests the whole initial sequence as soon as + that sequence is iterated. As a result this function should not be used with + large or infinite sequences. + + The function makes no assumption on the ordering of the original + sequence and uses a stable sort, that is the original order of equal elements is preserved. +
+'T seq
+ + The input sequence. +
+'T seq
+ + The result sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
let input = seq { 8; 4; 3; 1; 6; 1 }
+
+ Seq.sort input
+
+seq { 1; 1 3; 4; 6; 8 }
.
+
+
+
+
+
+ + Applies a key-generating function to each element of a sequence and yield a sequence ordered + by keys. The keys are compared using generic comparison as implemented by Operators.compare. +
++ This function returns a sequence that digests the whole initial sequence as soon as + that sequence is iterated. As a result this function should not be used with + large or infinite sequences. + + The function makes no assumption on the ordering of the original + sequence and uses a stable sort, that is the original order of equal elements is preserved. +
+'T -> 'Key
+ + A function to transform items of the input sequence into comparable keys. +
+'T seq
+ + The input sequence. +
+'T seq
+ + The result sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
let input = [ "a"; "bbb"; "cccc"; "dd" ]
+
+ input |> Seq.sortBy (fun s -> s.Length)
+
+seq { "a"; "dd"; "bbb"; "cccc" }
.
+
+
+
+
+
+ Seq.sortByDescending projection source
+ 'T -> 'Key
+ -
+ A function to transform items of the input sequence into comparable keys.
+
+ 'T seq
+ -
+ The input sequence.
+
+ 'T seq
+
+ The result sequence.
+ + Applies a key-generating function to each element of a sequence and yield a sequence ordered + descending by keys. The keys are compared using generic comparison as implemented by Operators.compare. +
++ This function returns a sequence that digests the whole initial sequence as soon as + that sequence is iterated. As a result this function should not be used with + large or infinite sequences. The function makes no assumption on the ordering of the original + sequence. + + This is a stable sort, that is the original order of equal elements is preserved. +
+'T -> 'Key
+ + A function to transform items of the input sequence into comparable keys. +
+'T seq
+ + The input sequence. +
+'T seq
+ + The result sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
let input = ["a"; "bbb"; "cccc"; "dd"]
+
+ input |> Seq.sortByDescending (fun s -> s.Length)
+
+seq { "cccc"; "bbb"; "dd"; "a" }
.
+
+
+
+
+
+
+ + This function returns a sequence that digests the whole initial sequence as soon as + that sequence is iterated. As a result this function should not be used with + large or infinite sequences. The function makes no assumption on the ordering of the original + sequence. + + This is a stable sort, that is the original order of equal elements is preserved. +
+'T seq
+ + The input sequence. +
+'T seq
+ + The result sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
let input = seq { 8; 4; 3; 1; 6; 1 }
+
+ input |> Seq.sortDescending
+
+seq { 8; 6; 4; 3; 1; 1 }
.
+
+
+
+
+
+
+ + This function returns a sequence that digests the whole initial sequence as soon as + that sequence is iterated. As a result this function should not be used with + large or infinite sequences. + + The function makes no assumption on the ordering of the original + sequence and uses a stable sort, that is the original order of equal elements is preserved. +
+'T -> 'T -> int
+ + The function to compare the collection elements. +
+'T seq
+ + The input sequence. +
+'T seq
+ + The result sequence. +
++ Sort a sequence of pairs using a comparison function that compares string lengths then index numbers: +
let compareEntries (n1: int, s1: string) (n2: int, s2: string) =
+ let c = compare s1.Length s2.Length
+ if c <> 0 then c else
+ compare n1 n2
+
+ let input = [ (0,"aa"); (1,"bbb"); (2,"cc"); (3,"dd") ]
+
+ input |> Seq.sortWith compareEntries
+
+seq { (0, "aa"); (2, "cc"); (3, "dd"); (1, "bbb") }
.
+
+
+
+
+
+
+ + This function returns a sequence that digests the whole initial sequence as soon as that + sequence is iterated. As a result this function should not be used with large or infinite sequences.This function consumes the whole input sequence before yielding the first element of the result sequence. +
+int
+ + The maximum number of chunks. +
+'T seq
+ + The input sequence. +
+'T[] seq
+ + The sequence split into chunks. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+ + ArgumentException + + | +
+ Thrown when count is not positive.
+ |
+
+
let inputs = [1; 2; 3; 4; 5]
+
+ inputs |> Seq.splitInto 3
+
+seq { [|1; 2|]; [|3; 4|]; [|5|] }
+
+ +
let inputs = [1; 2; 3; 4; 5]
+
+ inputs |> Seq.splitInto -1
+
+ArgumentException
+
+
+
+
+
+ Seq.sum source
+
+
+
+
+ Seq.sum source
+ ^T seq
+ -
+ The input sequence.
+
+ ^T
+
+ The computed sum.
+
+ The elements are summed using the +
operator and Zero
property associated with the generated type.
+
^T seq
+ + The input sequence. +
+^T
+ + The computed sum. +
++
let input = [ 1; 5; 3; 2 ]
+
+ input |> Seq.sum
+
+11
.
+
+
+
+
+
+ Seq.sumBy projection source
+ 'T -> ^U
+ -
+ A function to transform items from the input sequence into the type that will be summed.
+
+ 'T seq
+ -
+ The input sequence.
+
+ ^U
+
+ The computed sum.
+ + Returns the sum of the results generated by applying the function to each element of the sequence. +
+
+ The generated elements are summed using the +
operator and Zero
property associated with the generated type.
+
'T -> ^U
+ + A function to transform items from the input sequence into the type that will be summed. +
+'T seq
+ + The input sequence. +
+^U
+ + The computed sum. +
++
let input = [ "aa"; "bbb"; "cc" ]
+
+ input |> Seq.sumBy (fun s -> s.Length)
+
+7
.
+
+
+
+
+
+
+ Seq.tail source
+
+
+
+
+
+ + Returns a sequence that skips 1 element of the underlying sequence and then yields the + remaining elements of the sequence. +
+'T seq
+ + The input sequence. +
+'T seq
+ + The result sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+ + InvalidOperationException + + | ++ Thrown when the input sequence is empty. + | +
+
let inputs = ["a"; "bb"; "ccc"]
+
+ inputs |> Seq.tail
+
+seq { "bb"; "ccc" }
+
+
+
+
+
+ Seq.take count source
+
+
+
+
+
+
+ Throws InvalidOperationException
+ if the count exceeds the number of elements in the sequence. Seq.truncate
+ returns as many items as the sequence contains instead of throwing an exception.
+
int
+ + The number of items to take. +
+'T seq
+ + The input sequence. +
+'T seq
+ + The result sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+ + ArgumentException + + | ++ Thrown when the input sequence is empty and the count is greater than zero. + | +
+ + InvalidOperationException + + | ++ Thrown when count exceeds the number of elements + in the sequence. + | +
+
let inputs = ["a"; "b"; "c"; "d"]
+
+ inputs |> Seq.take 2
+
+["a"; "b"]
+
+ +
let inputs = ["a"; "b"; "c"; "d"]
+
+ inputs |> Seq.take 6
+
+InvalidOperationException
.
+
+
+ +
let inputs = ["a"; "b"; "c"; "d"]
+
+ inputs |> Seq.take 0
+
+
+
+
+ + Returns a sequence that, when iterated, yields elements of the underlying sequence while the + given predicate returns True, and then returns no further elements. +
+'T -> bool
+ + A function that evaluates to false when no more items should be returned. +
+'T seq
+ + The input sequence. +
+'T seq
+ + The result sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
let inputs = ["a"; "bb"; "ccc"; "d"]
+
+ inputs |> Seq.takeWhile (fun x -> x.Length < 3)
+
+seq { "a"; "bb" }
+
+
+
+
+
+ Seq.toArray source
+
+
+
+
+ Seq.toArray source
+ 'T seq
+ -
+ The input sequence.
+
+ 'T[]
+
+ The result array.
+ 'T seq
+ + The input sequence. +
+'T[]
+ + The result array. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
let inputs = seq { 1; 2; 5 }
+
+ inputs |> Seq.toArray
+
+[| 1; 2; 5 |]
.
+
+
+
+
+
+
+ Seq.toList source
+
+
+
+
+
+ 'T seq
+ + The input sequence. +
+'T list
+ + The result list. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
let inputs = seq { 1; 2; 5 }
+
+ inputs |> Seq.toList
+
+[ 1; 2; 5 ]
.
+
+
+
+
+
+
+ Seq.transpose source
+
+
+
+
+
+ + This function returns a sequence that digests the whole initial sequence as soon as + that sequence is iterated. As a result this function should not be used with + large or infinite sequences. +
+'Collection seq
+ + The input sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
let inputs =
+ [ [ 10; 20; 30 ]
+ [ 11; 21; 31 ] ]
+
+ inputs |> Seq.transpose
+
+[ [10; 11]; [20; 21]; [30; 31] ]
.
+
+
+
+
+
+
+ int
+ + The maximum number of items to enumerate. +
+'T seq
+ + The input sequence. +
+'T seq
+ + The result sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
let inputs = ["a"; "b"; "c"; "d"]
+
+ inputs |> Seq.truncate 2
+
+seq { "a"; "b" }
+
+ +
let inputs = ["a"; "b"; "c"; "d"]
+
+ inputs |> Seq.truncate 6
+
+seq { "a"; "b"; "c"; "d" }
+
+ +
let inputs = ["a"; "b"; "c"; "d"]
+
+ inputs |> Seq.truncate 0
+
+
+
+
+
+
+ Returns the only element of the sequence or None
if sequence is empty or contains more than one element.
+
'T seq
+ + The input sequence. +
+'T option
+ + The only element of the sequence or None. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
let inputs = ["banana"]
+
+ inputs |> Seq.tryExactlyOne
+
+Some banana
+
+ +
let inputs = ["pear"; "banana"]
+
+ inputs |> Seq.tryExactlyOne
+
+None
+
+ +
[] |> Seq.tryExactlyOne
+
+None
+
+
+
+
+ Seq.tryFind predicate source
+ 'T -> bool
+ -
+ A function that evaluates to a Boolean when given an item in the sequence.
+
+ 'T seq
+ -
+ The input sequence.
+
+ 'T option
+
+ The found element or None.
+ + Returns the first element for which the given function returns True. + Return None if no such element exists. +
+'T -> bool
+ + A function that evaluates to a Boolean when given an item in the sequence. +
+'T seq
+ + The input sequence. +
+'T option
+ + The found element or None. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+ Try to find the first even number: +
let inputs = [1; 2; 3]
+
+ inputs |> Seq.tryFind (fun elm -> elm % 2 = 0)
+
+Some 2
+
+ + Try to find the first even number: +
let inputs = [1; 5; 3]
+
+ inputs |> Seq.tryFind (fun elm -> elm % 2 = 0)
+
+None
+
+
+
+
+ Seq.tryFindBack predicate source
+ 'T -> bool
+ -
+ A function that evaluates to a Boolean when given an item in the sequence.
+
+ 'T seq
+ -
+ The input sequence.
+
+ 'T option
+
+ The found element or None.
+ + Returns the last element for which the given function returns True. + Return None if no such element exists. +
++ This function digests the whole initial sequence as soon as it is called. As a + result this function should not be used with large or infinite sequences. +
+'T -> bool
+ + A function that evaluates to a Boolean when given an item in the sequence. +
+'T seq
+ + The input sequence. +
+'T option
+ + The found element or None. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+ Try to find the first even number from the back: +
let inputs = [1; 2; 3; 4; 5]
+
+ inputs |> Seq.tryFindBack (fun elm -> elm % 2 = 0)
+
+Some 4
+
+ + Try to find the first even number from the back: +
let inputs = [1; 5; 3]
+
+ inputs |> Seq.tryFindBack (fun elm -> elm % 2 = 0)
+
+None
+
+
+
+
+ Seq.tryFindIndex predicate source
+ 'T -> bool
+ -
+ A function that evaluates to a Boolean when given an item in the sequence.
+
+ 'T seq
+ -
+ The input sequence.
+
+ int option
+
+ The found index or None.
+
+ Returns the index of the first element in the sequence
+ that satisfies the given predicate. Return None
if no such element exists.
+
'T -> bool
+ + A function that evaluates to a Boolean when given an item in the sequence. +
+'T seq
+ + The input sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+ Try to find the index of the first even number: +
let inputs = [1; 2; 3; 4; 5]
+
+ inputs |> Seq.tryFindIndex (fun elm -> elm % 2 = 0)
+
+Some 1
+
+ + Try to find the index of the first even number: +
let inputs = [1; 3; 5; 7]
+
+ inputs |> Seq.tryFindIndex (fun elm -> elm % 2 = 0)
+
+None
+
+
+
+
+ Seq.tryFindIndexBack predicate source
+ 'T -> bool
+ -
+ A function that evaluates to a Boolean when given an item in the sequence.
+
+ 'T seq
+ -
+ The input sequence.
+
+ int option
+
+ The found index or None
.
+
+ Returns the index of the last element in the sequence
+ that satisfies the given predicate. Return None
if no such element exists.
+
+ This function digests the whole initial sequence as soon as it is called. As a + result this function should not be used with large or infinite sequences. +
+'T -> bool
+ + A function that evaluates to a Boolean when given an item in the sequence. +
+'T seq
+ + The input sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+ Try to find the index of the first even number from the back: +
let inputs = [1; 2; 3; 4; 5]
+
+ inputs |> Seq.tryFindIndexBack (fun elm -> elm % 2 = 0)
+
+Some 3
+
+ + Try to find the index of the first even number from the back: +
let inputs = [1; 3; 5; 7]
+
+ inputs |> Seq.tryFindIndexBack (fun elm -> elm % 2 = 0)
+
+None
+
+
+
+
+
+ Seq.tryHead source
+
+
+
+
+
+ + Returns the first element of the sequence, or None if the sequence is empty. +
+'T seq
+ + The input sequence. +
+'T option
+ + The first element of the sequence or None. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
["banana"; "pear"] |> Seq.tryHead
+
+Some "banana"
+
+ +
[] |> Seq.tryHead
+
+None
+
+
+
+
+
+
+ Tries to find the nth element in the sequence.
+ Returns None
if index is negative or the input sequence does not contain enough elements.
+
int
+ + The index of element to retrieve. +
+'T seq
+ + The input sequence. +
+'T option
+
+ The nth element of the sequence or None
.
+
+ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
let inputs = ["a"; "b"; "c"]
+
+ inputs |> Seq.tryItem 1
+
+Some "b"
.
+
+
+ +
let inputs = ["a"; "b"; "c"]
+
+ inputs |> Seq.tryItem 4
+
+None
.
+
+
+
+
+
+
+ Seq.tryLast source
+
+
+
+
+
+
+ Returns the last element of the sequence.
+ Return None
if no such element exists.
+
'T seq
+ + The input sequence. +
+'T option
+ + The last element of the sequence or None. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
["pear"; "banana"] |> Seq.tryLast
+
+Some "banana"
+
+ +
[] |> Seq.tryLast
+
+None
+
+
+
+
+ Seq.tryPick chooser source
+ 'T -> 'U option
+ -
+ A function that transforms items from the input sequence into options.
+
+ 'T seq
+ -
+ The input sequence.
+
+ 'U option
+
+ The chosen element or None
.
+ + Applies the given function to successive elements, returning the first + result where the function returns "Some(x)". +
+'T -> 'U option
+ + A function that transforms items from the input sequence into options. +
+'T seq
+ + The input sequence. +
+'U option
+
+ The chosen element or None
.
+
+ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
let input = [1; 2; 3]
+
+ input |> Seq.tryPick (fun n -> if n % 2 = 0 then Some (string n) else None)
+
+Some "2"
.
+
+
+ +
let input = [1; 2; 3]
+
+ input |> Seq.tryPick (fun n -> if n > 3 = 0 then Some (string n) else None)
+
+None
.
+
+
+
+
+
+ Seq.unfold generator state
+ 'State -> ('T * 'State) option
+ -
+ A function that takes in the current state and returns an option tuple of the next
+ element of the sequence and the next state value.
+
+ 'State
+ -
+ The initial state value.
+
+ 'T seq
+
+ The result sequence.
+
+ Returns a sequence that contains the elements generated by the given computation.
+ The given initial state
argument is passed to the element generator.
+ For each IEnumerator elements in the stream are generated on-demand by applying the element
+ generator, until a None value is returned by the element generator. Each call to the element
+ generator returns a new residual state
.
+
+ The stream will be recomputed each time an IEnumerator is requested and iterated for the Seq. +
+'State -> ('T * 'State) option
+ + A function that takes in the current state and returns an option tuple of the next + element of the sequence and the next state value. +
+'State
+ + The initial state value. +
+'T seq
+ + The result sequence. +
++
1 |> Seq.unfold (fun state -> if state > 100 then None else Some (state, state * 2))
+
+seq { 1; 2; 4; 8; 16; 32; 64 }
+
+ +
1I |> Seq.unfold (fun state -> Some (state, state * 2I))
+
+seq { 1I; 2I; 4I; 8I; ... }
+
+
+
+
+ Seq.updateAt index value source
+ int
+ -
+ The index of the item to be replaced.
+
+ 'T
+ -
+ The new value.
+
+ 'T seq
+ -
+ The input sequence.
+
+ 'T seq
+
+ The result sequence.
+ + Return a new sequence with the item at a given index set to the new value. +
+int
+ + The index of the item to be replaced. +
+'T
+ + The new value. +
+'T seq
+ + The input sequence. +
+'T seq
+ + The result sequence. +
++ + ArgumentException + + | ++ Thrown when index is outside 0..source.Length - 1 + | +
+
seq { 0; 1; 2 } |> Seq.updateAt 1 9
+
+seq { 0; 9; 2 }
.
+
+
+
+
+
+ Seq.where predicate source
+ 'T -> bool
+ -
+ A function to test whether each item in the input sequence should be included in the output.
+
+ 'T seq
+ -
+ The input sequence.
+
+ 'T seq
+
+ The result sequence.
+ + Returns a new collection containing only the elements of the collection + for which the given predicate returns "true". +
++ The returned sequence may be passed between threads safely. However, + individual IEnumerator values generated from the returned sequence should not be accessed concurrently. + + Remember sequence is lazy, effects are delayed until it is enumerated. + + A synonym for Seq.filter. +
+'T -> bool
+ + A function to test whether each item in the input sequence should be included in the output. +
+'T seq
+ + The input sequence. +
+'T seq
+ + The result sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+
[1; 2; 3; 4] |> Seq.where (fun elm -> elm % 2 = 0)
+
+seq { 2; 4 }
+
+
+
+
+
+ + Returns a sequence yielding sliding windows containing elements drawn from the input + sequence. Each window is returned as a fresh array. +
+int
+ + The number of elements in each window. +
+'T seq
+ + The input sequence. +
+'T[] seq
+ + The result sequence. +
++ + ArgumentNullException + + | ++ Thrown when the input sequence is null. + | +
+ + ArgumentException + + | ++ Thrown when windowSize is not positive. + | +
+
let inputs = [1; 2; 3; 4; 5]
+
+ inputs |> Seq.windowed 3
+
+seq { [| 1; 2; 3 |]; [| 2; 3; 4 |]; [| 3; 4; 5 |] }
+
+
+
+
+
+ Seq.zip source1 source2
+
+
+
+
+
+ + Combines the two sequences into a sequence of pairs. The two sequences need not have equal lengths: + when one sequence is exhausted any remaining elements in the other + sequence are ignored. +
+'T1 seq
+ + The first input sequence. +
+'T2 seq
+ + The second input sequence. +
+('T1 * 'T2) seq
+ + The result sequence. +
++ + ArgumentNullException + + | ++ Thrown when either of the input sequences is null. + | +
+
let numbers = [1; 2]
+ let names = ["one"; "two"]
+
+ Seq.zip numbers names
+
+seq { (1, "one"); (2, "two") }
.
+
+
+
+
+
+ Seq.zip3 source1 source2 source3
+ 'T1 seq
+ -
+ The first input sequence.
+
+ 'T2 seq
+ -
+ The second input sequence.
+
+ 'T3 seq
+ -
+ The third input sequence.
+
+ ('T1 * 'T2 * 'T3) seq
+
+ The result sequence.
+ + Combines the three sequences into a sequence of triples. The sequences need not have equal lengths: + when one sequence is exhausted any remaining elements in the other + sequences are ignored. +
+'T1 seq
+ + The first input sequence. +
+'T2 seq
+ + The second input sequence. +
+'T3 seq
+ + The third input sequence. +
+('T1 * 'T2 * 'T3) seq
+ + The result sequence. +
++ + ArgumentNullException + + | ++ Thrown when any of the input sequences is null. + | +
+
let numbers = [1; 2]
+ let names = ["one"; "two"]
+ let roman = ["I"; "II"]
+
+ Seq.zip3 numbers names roman
+
+seq { (1, "one", "I"); (2, "two", "II") }
.
+
+
+ + Contains operations for working with values of type Set. +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns a new set with an element added to the set. No exception is raised if + the set already contains the given element. + + |
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+val set: Set<int>
+Multiple items
+module Set + +from Microsoft.FSharp.Collections -------------------- type Set<'T (requires comparison)> = + interface IReadOnlyCollection<'T> + interface IStructuralEquatable + interface IComparable + interface IEnumerable + interface IEnumerable<'T> + interface ICollection<'T> + new: elements: 'T seq -> Set<'T> + member Add: value: 'T -> Set<'T> + member Contains: value: 'T -> bool + override Equals: obj -> bool + ... -------------------- new: elements: 'T seq -> Set<'T> val empty<'T (requires comparison)> : Set<'T> (requires comparison)
+val printfn: format: Printf.TextWriterFormat<'T> -> 'T
+member Set.Contains: value: 'T -> bool
+
+
+ The sample evaluates to the following output: Does the set contain 1? false
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+val set: Set<int>
+Multiple items
+module Set + +from Microsoft.FSharp.Collections -------------------- type Set<'T (requires comparison)> = + interface IReadOnlyCollection<'T> + interface IStructuralEquatable + interface IComparable + interface IEnumerable + interface IEnumerable<'T> + interface ICollection<'T> + new: elements: 'T seq -> Set<'T> + member Add: value: 'T -> Set<'T> + member Contains: value: 'T -> bool + override Equals: obj -> bool + ... -------------------- new: elements: 'T seq -> Set<'T> val empty<'T (requires comparison)> : Set<'T> (requires comparison)
+val printfn: format: Printf.TextWriterFormat<'T> -> 'T
+property Set.Count: int with get
+
+
+ The sample evaluates to the following output: The set has 3 elements
+
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns a new set with the elements of the second set removed from the first. + + |
+
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+Multiple items
+module Set + +from Microsoft.FSharp.Collections -------------------- type Set<'T (requires comparison)> = + interface IReadOnlyCollection<'T> + interface IStructuralEquatable + interface IComparable + interface IEnumerable + interface IEnumerable<'T> + interface ICollection<'T> + new: elements: 'T seq -> Set<'T> + member Add: value: 'T -> Set<'T> + member Contains: value: 'T -> bool + override Equals: obj -> bool + ... -------------------- new: elements: 'T seq -> Set<'T> val empty<'T (requires comparison)> : Set<'T> (requires comparison)
+Multiple items
+
+
+ Evaluates to val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = + int set [ ] .
+
+
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Tests if any element of the collection satisfies the given predicate.
+ If the input function is |
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns a new collection containing only the elements of the collection + for which the given predicate returns True. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Set.fold folder state set
+ + + Parameters: +
'State -> 'T -> 'State
+ -
+ The accumulating function.
+
+ + + + state + + : + 'State
+ -
+ The initial state.
+
+ + + + set + + : + Set<'T>
+ -
+ The input set.
+
+ + + + Returns: + 'State
+
+ The final state.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Applies the given accumulating function to all the elements of the set + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Set.foldBack folder set state
+ + + Parameters: +
'T -> 'State -> 'State
+ -
+ The accumulating function.
+
+ + + + set + + : + Set<'T>
+ -
+ The input set.
+
+ + + + state + + : + 'State
+ -
+ The initial state.
+
+ + + + Returns: + 'State
+
+ The final state.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Applies the given accumulating function to all the elements of the set. + + |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Tests if all elements of the collection satisfy the given predicate.
+ If the input function is |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+val set1: Set<int>
+Multiple items
+module Set + +from Microsoft.FSharp.Collections -------------------- type Set<'T (requires comparison)> = + interface IReadOnlyCollection<'T> + interface IStructuralEquatable + interface IComparable + interface IEnumerable + interface IEnumerable<'T> + interface ICollection<'T> + new: elements: 'T seq -> Set<'T> + member Add: value: 'T -> Set<'T> + member Contains: value: 'T -> bool + override Equals: obj -> bool + ... -------------------- new: elements: 'T seq -> Set<'T> val empty<'T (requires comparison)> : Set<'T> (requires comparison)
+val set2: Set<int>
+val printfn: format: Printf.TextWriterFormat<'T> -> 'T
+
+
+ The sample evaluates to the following output: The intersection of set [1; 2; 3] and set [2; 3; 4] is set [2; 3]
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Computes the intersection of a sequence of sets. The sequence must be non-empty. + + |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+val set: Set<int>
+Multiple items
+module Set + +from Microsoft.FSharp.Collections -------------------- type Set<'T (requires comparison)> = + interface IReadOnlyCollection<'T> + interface IStructuralEquatable + interface IComparable + interface IEnumerable + interface IEnumerable<'T> + interface ICollection<'T> + new: elements: 'T seq -> Set<'T> + member Add: value: 'T -> Set<'T> + member Contains: value: 'T -> bool + override Equals: obj -> bool + ... -------------------- new: elements: 'T seq -> Set<'T> val empty<'T (requires comparison)> : Set<'T> (requires comparison)
+val printfn: format: Printf.TextWriterFormat<'T> -> 'T
+property Set.IsEmpty: bool with get
+
+
+ The sample evaluates to the following output: Is the set empty? false
+
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Evaluates to "true" if all elements of the first set are in the second, and at least + one element of the second is not in the first. + + |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Evaluates to "true" if all elements of the second set are in the first, and at least + one element of the first is not in the second. + + |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Evaluates to "true" if all elements of the first set are in the second + + |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Evaluates to "true" if all elements of the second set are in the first. + + |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Applies the given function to each element of the set, in order according + to the comparison function. + + |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns a new collection containing the results of applying the + given function to each element of the input set. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Set.maxElement set
+ + + Parameters: +
Set<'T>
+ -
+ The input set.
+
+ + + + Returns: + 'T
+
+ The max value from the set.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns the highest element in the set according to the ordering being used for the set. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Set.minElement set
+ + + Parameters: +
Set<'T>
+ -
+ The input set.
+
+ + + + Returns: + 'T
+
+ The min value from the set.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns the lowest element in the set according to the ordering being used for the set. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Set.ofArray array
+ + + Parameters: +
'T[]
+ -
+ The input array.
+
+ + + + Returns: + Set<'T>
+
+ A set containing the elements of array .
+ + |
+
+
+
+ + ++
+ Example +++
+val set: Set<int * int * int>
+Multiple items
+module Set + +from Microsoft.FSharp.Collections -------------------- type Set<'T (requires comparison)> = + interface IReadOnlyCollection<'T> + interface IStructuralEquatable + interface IComparable + interface IEnumerable + interface IEnumerable<'T> + interface ICollection<'T> + new: elements: 'T seq -> Set<'T> + member Add: value: 'T -> Set<'T> + member Contains: value: 'T -> bool + override Equals: obj -> bool + ... -------------------- new: elements: 'T seq -> Set<'T> val ofArray: array: 'T array -> Set<'T> (requires comparison)
+val printfn: format: Printf.TextWriterFormat<'T> -> 'T
+
+
+ The sample evaluates to the following output: The set is set [(1, 2, 3)] and type is "FSharpSet`1"
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+val set: Set<int * int * int>
+Multiple items
+module Set + +from Microsoft.FSharp.Collections -------------------- type Set<'T (requires comparison)> = + interface IReadOnlyCollection<'T> + interface IStructuralEquatable + interface IComparable + interface IEnumerable + interface IEnumerable<'T> + interface ICollection<'T> + new: elements: 'T seq -> Set<'T> + member Add: value: 'T -> Set<'T> + member Contains: value: 'T -> bool + override Equals: obj -> bool + ... -------------------- new: elements: 'T seq -> Set<'T> val ofList: elements: 'T list -> Set<'T> (requires comparison)
+val printfn: format: Printf.TextWriterFormat<'T> -> 'T
+
+
+ The sample evaluates to the following output: The set is set [(1, 2, 3)] and type is "FSharpSet`1"
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+val set: Set<int * int * int>
+Multiple items
+module Set + +from Microsoft.FSharp.Collections -------------------- type Set<'T (requires comparison)> = + interface IReadOnlyCollection<'T> + interface IStructuralEquatable + interface IComparable + interface IEnumerable + interface IEnumerable<'T> + interface ICollection<'T> + new: elements: 'T seq -> Set<'T> + member Add: value: 'T -> Set<'T> + member Contains: value: 'T -> bool + override Equals: obj -> bool + ... -------------------- new: elements: 'T seq -> Set<'T> val ofSeq: elements: 'T seq -> Set<'T> (requires comparison)
+val printfn: format: Printf.TextWriterFormat<'T> -> 'T
+
+
+ The sample evaluates to the following output: The set is set [(1, 2, 3)] and type is "FSharpSet`1"
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Set.partition predicate set
+ + + Parameters: +
'T -> bool
+ -
+ The function to test set elements.
+
+ + + + set + + : + Set<'T>
+ -
+ The input set.
+
+ + + + Returns: + Set<'T> * Set<'T>
+
+ A pair of sets with the first containing the elements for which predicate returns
+ true and the second containing the elements for which predicate returns false.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Splits the set into two sets containing the elements for which the given predicate + returns true and false respectively. + + |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns a new set with the given element removed. No exception is raised if + the set doesn't contain the given element. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Set.singleton value
+ + + Parameters: +
'T
+ -
+ The value for the set to contain.
+
+ + + + Returns: + Set<'T>
+
+ The set containing value .
+ + |
+
+
+
+ + ++
+ Example +++
+Multiple items
+module Set + +from Microsoft.FSharp.Collections -------------------- type Set<'T (requires comparison)> = + interface IReadOnlyCollection<'T> + interface IStructuralEquatable + interface IComparable + interface IEnumerable + interface IEnumerable<'T> + interface ICollection<'T> + new: elements: 'T seq -> Set<'T> + member Add: value: 'T -> Set<'T> + member Contains: value: 'T -> bool + override Equals: obj -> bool + ... -------------------- new: elements: 'T seq -> Set<'T> val singleton: value: 'T -> Set<'T> (requires comparison)
+
+
+ Evaluates to set [ 7 ] .
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Set.toArray set
+ + + Parameters: +
Set<'T>
+ -
+ The input set.
+
+ + + + Returns: + 'T[]
+
+ An ordered array of the elements of set .
+ + |
+
+
+
+ + ++
+ Example +++
+val set: Set<int>
+Multiple items
+module Set + +from Microsoft.FSharp.Collections -------------------- type Set<'T (requires comparison)> = + interface IReadOnlyCollection<'T> + interface IStructuralEquatable + interface IComparable + interface IEnumerable + interface IEnumerable<'T> + interface ICollection<'T> + new: elements: 'T seq -> Set<'T> + member Add: value: 'T -> Set<'T> + member Contains: value: 'T -> bool + override Equals: obj -> bool + ... -------------------- new: elements: 'T seq -> Set<'T> val empty<'T (requires comparison)> : Set<'T> (requires comparison)
+Multiple items
+val array: int array -------------------- type 'T array = 'T array val toArray: set: Set<'T> -> 'T array (requires comparison)
+val printfn: format: Printf.TextWriterFormat<'T> -> 'T
+
+
+ The sample evaluates to the following output: The set is [|1; 2; 3|] and type is System.Int32[]
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+val set: Set<int>
+Multiple items
+module Set + +from Microsoft.FSharp.Collections -------------------- type Set<'T (requires comparison)> = + interface IReadOnlyCollection<'T> + interface IStructuralEquatable + interface IComparable + interface IEnumerable + interface IEnumerable<'T> + interface ICollection<'T> + new: elements: 'T seq -> Set<'T> + member Add: value: 'T -> Set<'T> + member Contains: value: 'T -> bool + override Equals: obj -> bool + ... -------------------- new: elements: 'T seq -> Set<'T> val empty<'T (requires comparison)> : Set<'T> (requires comparison)
+Multiple items
+val list: int list -------------------- type 'T list = List<'T> val toList: set: Set<'T> -> 'T list (requires comparison)
+val printfn: format: Printf.TextWriterFormat<'T> -> 'T
+
+
+ The sample evaluates to the following output: The set is [1; 2; 3] and type is "FSharpList`1"
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+val set: Set<int>
+Multiple items
+module Set + +from Microsoft.FSharp.Collections -------------------- type Set<'T (requires comparison)> = + interface IReadOnlyCollection<'T> + interface IStructuralEquatable + interface IComparable + interface IEnumerable + interface IEnumerable<'T> + interface ICollection<'T> + new: elements: 'T seq -> Set<'T> + member Add: value: 'T -> Set<'T> + member Contains: value: 'T -> bool + override Equals: obj -> bool + ... -------------------- new: elements: 'T seq -> Set<'T> val empty<'T (requires comparison)> : Set<'T> (requires comparison)
+Multiple items
+val seq: int seq -------------------- type 'T seq = System.Collections.Generic.IEnumerable<'T> val toSeq: set: Set<'T> -> 'T seq (requires comparison)
+val printfn: format: Printf.TextWriterFormat<'T> -> 'T
+
+
+ The sample evaluates to the following output: he set is set [1; 2; 3] and type is Microsoft.FSharp.Collections.FSharpSet`1[System.Int32]
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+val set1: Set<int>
+Multiple items
+module Set + +from Microsoft.FSharp.Collections -------------------- type Set<'T (requires comparison)> = + interface IReadOnlyCollection<'T> + interface IStructuralEquatable + interface IComparable + interface IEnumerable + interface IEnumerable<'T> + interface ICollection<'T> + new: elements: 'T seq -> Set<'T> + member Add: value: 'T -> Set<'T> + member Contains: value: 'T -> bool + override Equals: obj -> bool + ... -------------------- new: elements: 'T seq -> Set<'T> val empty<'T (requires comparison)> : Set<'T> (requires comparison)
+val set2: Set<int>
+val printfn: format: Printf.TextWriterFormat<'T> -> 'T
+val union: set1: Set<'T> -> set2: Set<'T> -> Set<'T> (requires comparison)
+
+
+ The sample evaluates to the following output: The union of set [1; 2; 3] and set [2; 3; 4] is set [1; 2; 3; 4]
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+ + ++ +
+ Example +++
+val headersByFile: string list seq
+Multiple items
+val seq: sequence: 'T seq -> 'T seq -------------------- type 'T seq = System.Collections.Generic.IEnumerable<'T> module Seq
+
+from Microsoft.FSharp.Collections
+val map: mapping: ('T -> 'U) -> source: 'T seq -> 'U seq
+Multiple items
+module Set + +from Microsoft.FSharp.Collections -------------------- type Set<'T (requires comparison)> = + interface IReadOnlyCollection<'T> + interface IStructuralEquatable + interface IComparable + interface IEnumerable + interface IEnumerable<'T> + interface ICollection<'T> + new: elements: 'T seq -> Set<'T> + member Add: value: 'T -> Set<'T> + member Contains: value: 'T -> bool + override Equals: obj -> bool + ... -------------------- new: elements: 'T seq -> Set<'T> val ofList: elements: 'T list -> Set<'T> (requires comparison)
+val intersectMany: sets: Set<'T> seq -> Set<'T> (requires comparison)
+val printfn: format: Printf.TextWriterFormat<'T> -> 'T
+
+
+ The sample evaluates to the following output: The union of seq
+ [["id"; "name"; "date"; "color"]; ["id"; "age"; "date"];
+ ["id"; "sex"; "date"; "animal"]] is set ["age"; "animal"; "color"; "date"; "id"; "name"; "sex"]
+
+ |
+
+ Operations for collections such as lists, arrays, sets, maps and sequences. See also + F# Collection Types in the F# Language Guide. + +
++ Type/Module + | ++ Description + | +
+ + | ++ + | +
+ + + + Array2D + + + + |
+ + + | +
+ + + + Array3D + + + + |
+ + + | +
+ + + + Array4D + + + + |
+ + + | +
+ + + + ComparisonIdentity + + + + |
+ + + | +
+ + + + HashIdentity + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Common notions of value identity implementing the IEqualityComparer + interface, for constructing Dictionary objects and other collections + + |
+
+ + | ++ + | +
+ + + + 'T list + + + + |
+ + + | +
+ + | ++ + | +
+ + + + Map<'Key, 'Value> + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Immutable maps based on binary trees, where keys are ordered by F# generic comparison. By default + comparison is the F# structural comparison function or uses implementations of the IComparable interface on key values. + + |
+
+ + | ++ + | +
+ + + + 'T seq + + + + |
+ + + | +
+ + | ++ + | +
+ + + + Set<'T> + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Immutable sets based on binary trees, where elements are ordered by F# generic comparison. By default + comparison is the F# structural comparison function or uses implementations of the IComparable interface on element values. + + |
+
+ The F# compiler emits references to this type to implement F# async expressions. +
++ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.IsCancellationRequested
+ + + + Returns: + bool
+
+ A value indicating asynchronous execution.
+ + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.OnCancellation
+ + + + Returns: + AsyncReturn
+
+ A value indicating asynchronous execution.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + The F# compiler emits calls to this function to implement F# async expressions. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.OnExceptionRaised
+ + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + The F# compiler emits calls to this function to implement F# async expressions. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.OnSuccess
+ + + Parameters: +
'T
+
+ + + + Returns: + AsyncReturn
+
+ A value indicating asynchronous execution.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + The F# compiler emits calls to this function to implement F# async expressions. + + |
+
+ Static member + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ AsyncActivation.Success(arg1) (result)
+ + + Parameters: +
AsyncActivation<'T>
+
+ + + + result + + : + 'T
+
+ + + + Returns: + AsyncReturn
+
+ A value indicating asynchronous execution.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + The F# compiler emits calls to this function to implement F# async expressions. + + |
+
+ Entry points for generated code +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ Bind ctxt part1 part2
+ + + Parameters: +
AsyncActivation<'T>
+ -
+ The async activation.
+
+ + + + part1 + + : + Async<'U>
+ -
+ The first part of the computation.
+
+ + + + part2 + + : + 'U -> Async<'T>
+ -
+ A function returning the second part of the computation.
+
+ + + + Returns: + AsyncReturn
+
+ An async activation suitable for running part1 of the asynchronous execution.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The F# compiler emits calls to this function to implement the |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ CallThenInvoke ctxt result1 part2
+ + + Parameters: +
AsyncActivation<'T>
+ -
+ The async activation.
+
+ + + + result1 + + : + 'U
+ -
+ The result of the first part of the computation.
+
+ + + + part2 + + : + 'U -> Async<'T>
+ -
+ A function returning the second part of the computation.
+
+ + + + Returns: + AsyncReturn
+
+ A value indicating asynchronous execution.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + The F# compiler emits calls to this function to implement constructs for F# async expressions. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Invoke computation ctxt
+ + + Parameters: +
Async<'T>
+ -
+ The async computation.
+
+ + + + ctxt + + : + AsyncActivation<'T>
+ -
+ The async activation.
+
+ + + + Returns: + AsyncReturn
+
+ A value indicating asynchronous execution.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + The F# compiler emits calls to this function to implement constructs for F# async expressions. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ MakeAsync body
+ + + Parameters: +
AsyncActivation<'T> -> AsyncReturn
+ -
+ The body of the async computation.
+
+ + + + Returns: + Async<'T>
+
+ The async computation.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + The F# compiler emits calls to this function to implement F# async expressions. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ TryFinally ctxt computation finallyFunction
+ + + Parameters: +
AsyncActivation<'T>
+ -
+ The async activation.
+
+ + + + computation + + : + Async<'T>
+ -
+ The computation to protect.
+
+ + + + finallyFunction + + : + unit -> unit
+ -
+ The finally code.
+
+ + + + Returns: + AsyncReturn
+
+ A value indicating asynchronous execution.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The F# compiler emits calls to this function to implement the |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ TryWith ctxt computation catchFunction
+ + + Parameters: +
AsyncActivation<'T>
+ -
+ The async activation.
+
+ + + + computation + + : + Async<'T>
+ -
+ The computation to protect.
+
+ + + + catchFunction + + : + Exception -> Async<'T> option
+ -
+ The exception filter.
+
+ + + + Returns: + AsyncReturn
+
+ A value indicating asynchronous execution.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The F# compiler emits calls to this function to implement the |
+
+ The F# compiler emits references to this type to implement F# async expressions. +
++ + Contains methods to build tasks using the F# computation expression syntax + +
++ Instance member + | ++ Description + | +
+
+
+
+
+
+ |
+ + + | +
+ Static member + | ++ Description + | +
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + The entry point for the dynamic implementation of the corresponding operation. Do not use directly, only used when executing quotations that involve tasks or other reflective execution of F# code. + + + |
+
+ A module of extension members providing asynchronous operations for some basic CLI types related to concurrency and I/O. +
++ Type extension + | ++ Description + | +||||
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Add
+ + + Parameters: +
'T -> unit
+ -
+ The function to be called for each observation.
+
+ + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Permanently connects a listener function to the observable. The listener will + be invoked for each observation. + + |
+ ||||
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.AsyncRead
+ + + Parameters: +
byte[]
+ -
+ The buffer to read into.
+
+ + + + ?offset + + : + int
+ -
+ An optional offset as a number of bytes in the stream.
+
+ + + + ?count + + : + int
+ -
+ An optional number of bytes to read from the stream.
+
+ + + + Returns: + Async<int>
+
+ An asynchronous computation that will read from the stream into the given buffer.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns an asynchronous computation that will read from the stream into the given buffer. + + |
+
+ + ArgumentException + + | ++ Thrown when the sum of offset and count is longer than + the buffer length. + | +
+ + ArgumentOutOfRangeException + + | ++ Thrown when offset or count is negative. + | +
+
+
+
+ this.AsyncRead
+
+
+
+
+
+
+
+
+
+ this.AsyncWrite
+
+
+
+
+ this.AsyncWrite
+ byte[]
+ -
+ The buffer to write from.
+
+ int
+ -
+ An optional offset as a number of bytes in the stream.
+
+ int
+ -
+ An optional number of bytes to write to the stream.
+
+ Async<unit>
+
+ An asynchronous computation that will write the given bytes to the stream.
+ + Returns an asynchronous computation that will write the given bytes to the stream. +
+
+ Extended Type:
+ Stream
+
byte[]
+ + The buffer to write from. +
+int
+ + An optional offset as a number of bytes in the stream. +
+int
+ + An optional number of bytes to write to the stream. +
+Async<unit>
+ + An asynchronous computation that will write the given bytes to the stream. +
++ + ArgumentException + + | ++ Thrown when the sum of offset and count is longer than + the buffer length. + | +
+ + ArgumentOutOfRangeException + + | ++ Thrown when offset or count is negative. + | +
+
+
+
+ this.Subscribe
+
+
+
+
+ this.Subscribe
+ 'T -> unit
+ -
+ The function to be called for each observation.
+
+ IDisposable
+
+ An object that will remove the listener if disposed.
+ + Connects a listener function to the observable. The listener will + be invoked for each observation. The listener can be removed by + calling Dispose on the returned IDisposable object. +
+
+ Extended Type:
+ IObservable
+
'T -> unit
+ + The function to be called for each observation. +
+IDisposable
+ + An object that will remove the listener if disposed. +
++ Contains operations for working with values of type IEvent. +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+namespace System
+val createTimer: interval: 'a -> IEvent<Timers.ElapsedEventHandler,Timers.ElapsedEventArgs>
+val interval: 'a
+val timer: Timers.Timer
+namespace System.Timers
+Multiple items
+type Timer = + inherit Component + interface ISupportInitialize + new: unit -> unit + 2 overloads + member BeginInit: unit -> unit + member Close: unit -> unit + member EndInit: unit -> unit + member Start: unit -> unit + member Stop: unit -> unit + member AutoReset: bool + member Enabled: bool + ... <summary>Generates an event after a set interval, with an option to generate recurring events.</summary> -------------------- Timers.Timer() : Timers.Timer Timers.Timer(interval: float) : Timers.Timer Timers.Timer(interval: TimeSpan) : Timers.Timer property Timers.Timer.AutoReset: bool with get, set
+<summary>Gets or sets a Boolean indicating whether the <see cref="T:System.Timers.Timer" /> should raise the <see cref="E:System.Timers.Timer.Elapsed" /> event only once (<see langword="false" />) or repeatedly (<see langword="true" />).</summary> <returns><see langword="true" /> if the <see cref="T:System.Timers.Timer" /> should raise the <see cref="E:System.Timers.Timer.Elapsed" /> event each time the interval elapses; <see langword="false" /> if it should raise the <see cref="E:System.Timers.Timer.Elapsed" /> event only once, after the first time the interval elapses. The default is <see langword="true" />.</returns> property Timers.Timer.Enabled: bool with get, set
+<summary>Gets or sets a value indicating whether the <see cref="T:System.Timers.Timer" /> should raise the <see cref="E:System.Timers.Timer.Elapsed" /> event.</summary> <exception cref="T:System.ObjectDisposedException">This property cannot be set because the timer has been disposed.</exception> <exception cref="T:System.ArgumentException">The <see cref="P:System.Timers.Timer.Interval" /> property was set to a value greater than <see cref="F:System.Int32.MaxValue">Int32.MaxValue</see> before the timer was enabled.</exception> <returns><see langword="true" /> if the <see cref="T:System.Timers.Timer" /> should raise the <see cref="E:System.Timers.Timer.Elapsed" /> event; otherwise, <see langword="false" />. The default is <see langword="false" />.</returns> event Timers.Timer.Elapsed: IEvent<Timers.ElapsedEventHandler,Timers.ElapsedEventArgs>
+val timer: IEvent<Timers.ElapsedEventHandler,Timers.ElapsedEventArgs>
+Multiple items
+module Event + +from Microsoft.FSharp.Control -------------------- type Event<'T> = + new: unit -> Event<'T> + member Trigger: arg: 'T -> unit + member Publish: IEvent<'T> -------------------- type Event<'Delegate,'Args (requires delegate and 'Delegate :> Delegate and reference type)> = + new: unit -> Event<'Delegate,'Args> + member Trigger: sender: obj * args: 'Args -> unit + member Publish: IEvent<'Delegate,'Args> -------------------- new: unit -> Event<'T> -------------------- new: unit -> Event<'Delegate,'Args> val add: callback: ('T -> unit) -> sourceEvent: IEvent<'Del,'T> -> unit (requires delegate and 'Del :> Delegate)
+val event: Timers.ElapsedEventArgs
+type ElapsedEventArgs =
+ inherit EventArgs
+ member SignalTime: DateTime
+<summary>Provides data for the <see cref="E:System.Timers.Timer.Elapsed" /> event.</summary> val printfn: format: Printf.TextWriterFormat<'T> -> 'T
+property Timers.ElapsedEventArgs.SignalTime: DateTime with get
+<summary>Gets the date/time when the <see cref="E:System.Timers.Timer.Elapsed" /> event was raised.</summary> <returns>The time the <see cref="E:System.Timers.Timer.Elapsed" /> event was raised.</returns> type Console =
+ static member Beep: unit -> unit + 1 overload
+ static member Clear: unit -> unit
+ static member GetCursorPosition: unit -> struct (int * int)
+ static member MoveBufferArea: sourceLeft: int * sourceTop: int * sourceWidth: int * sourceHeight: int * targetLeft: int * targetTop: int -> unit + 1 overload
+ static member OpenStandardError: unit -> Stream + 1 overload
+ static member OpenStandardInput: unit -> Stream + 1 overload
+ static member OpenStandardOutput: unit -> Stream + 1 overload
+ static member Read: unit -> int
+ static member ReadKey: unit -> ConsoleKeyInfo + 1 overload
+ static member ReadLine: unit -> string
+ ...
+<summary>Represents the standard input, output, and error streams for console applications. This class cannot be inherited.</summary> Console.ReadLine() : string
+val ignore: value: 'T -> unit
+
+
+ The sample will output the timer event every second:
+ 2/14/2022 11:52:05 PM
+ 2/14/2022 11:52:06 PM
+ 2/14/2022 11:52:07 PM
+ 2/14/2022 11:52:08 PM
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Event.choose chooser sourceEvent
+ + + Parameters: +
'T -> 'U option
+ -
+ The function to select and transform event values to pass on.
+
+ + + + sourceEvent + + : + IEvent<'Del, 'T>
+ -
+ The input event.
+
+ + + + Returns: + IEvent<'U>
+
+ An event that fires only when the chooser returns Some.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns a new event which fires on a selection of messages from the original event. + The selection function takes an original message to an optional new message. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Event.filter predicate sourceEvent
+ + + Parameters: +
'T -> bool
+ -
+ The function to determine which triggers from the event to propagate.
+
+ + + + sourceEvent + + : + IEvent<'Del, 'T>
+ -
+ The input event.
+
+ + + + Returns: + IEvent<'T>
+
+ An event that only passes values that pass the predicate.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns a new event that listens to the original event and triggers the resulting + event only when the argument to the event passes the given function. + + |
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns a new event that passes values transformed by the given function. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Event.merge event1 event2
+ + + Parameters: +
IEvent<'Del1, 'T>
+ -
+ The first input event.
+
+ + + + event2 + + : + IEvent<'Del2, 'T>
+ -
+ The second input event.
+
+ + + + Returns: + IEvent<'T>
+
+ An event that fires when either of the input events fire.
+ + |
+
+
+
+ + ++
+ Example +++
+namespace System
+val createTimer: interval: 'a -> IEvent<Timers.ElapsedEventHandler,Timers.ElapsedEventArgs>
+val interval: 'a
+val timer: Timers.Timer
+namespace System.Timers
+Multiple items
+type Timer = + inherit Component + interface ISupportInitialize + new: unit -> unit + 2 overloads + member BeginInit: unit -> unit + member Close: unit -> unit + member EndInit: unit -> unit + member Start: unit -> unit + member Stop: unit -> unit + member AutoReset: bool + member Enabled: bool + ... <summary>Generates an event after a set interval, with an option to generate recurring events.</summary> -------------------- Timers.Timer() : Timers.Timer Timers.Timer(interval: float) : Timers.Timer Timers.Timer(interval: TimeSpan) : Timers.Timer property Timers.Timer.AutoReset: bool with get, set
+<summary>Gets or sets a Boolean indicating whether the <see cref="T:System.Timers.Timer" /> should raise the <see cref="E:System.Timers.Timer.Elapsed" /> event only once (<see langword="false" />) or repeatedly (<see langword="true" />).</summary> <returns><see langword="true" /> if the <see cref="T:System.Timers.Timer" /> should raise the <see cref="E:System.Timers.Timer.Elapsed" /> event each time the interval elapses; <see langword="false" /> if it should raise the <see cref="E:System.Timers.Timer.Elapsed" /> event only once, after the first time the interval elapses. The default is <see langword="true" />.</returns> property Timers.Timer.Enabled: bool with get, set
+<summary>Gets or sets a value indicating whether the <see cref="T:System.Timers.Timer" /> should raise the <see cref="E:System.Timers.Timer.Elapsed" /> event.</summary> <exception cref="T:System.ObjectDisposedException">This property cannot be set because the timer has been disposed.</exception> <exception cref="T:System.ArgumentException">The <see cref="P:System.Timers.Timer.Interval" /> property was set to a value greater than <see cref="F:System.Int32.MaxValue">Int32.MaxValue</see> before the timer was enabled.</exception> <returns><see langword="true" /> if the <see cref="T:System.Timers.Timer" /> should raise the <see cref="E:System.Timers.Timer.Elapsed" /> event; otherwise, <see langword="false" />. The default is <see langword="false" />.</returns> event Timers.Timer.Elapsed: IEvent<Timers.ElapsedEventHandler,Timers.ElapsedEventArgs>
+val oneSecondTimer: IEvent<Timers.ElapsedEventHandler,Timers.ElapsedEventArgs>
+val fiveSecondsTimer: IEvent<Timers.ElapsedEventHandler,Timers.ElapsedEventArgs>
+val result: IEvent<Timers.ElapsedEventArgs>
+Multiple items
+module Event + +from Microsoft.FSharp.Control -------------------- type Event<'T> = + new: unit -> Event<'T> + member Trigger: arg: 'T -> unit + member Publish: IEvent<'T> -------------------- type Event<'Delegate,'Args (requires delegate and 'Delegate :> Delegate and reference type)> = + new: unit -> Event<'Delegate,'Args> + member Trigger: sender: obj * args: 'Args -> unit + member Publish: IEvent<'Delegate,'Args> -------------------- new: unit -> Event<'T> -------------------- new: unit -> Event<'Delegate,'Args> val merge: event1: IEvent<'Del1,'T> -> event2: IEvent<'Del2,'T> -> IEvent<'T> (requires delegate and 'Del1 :> Delegate and delegate and 'Del2 :> Delegate)
+member IObservable.Subscribe: callback: ('T -> unit) -> IDisposable
+IObservable.Subscribe(observer: IObserver<Timers.ElapsedEventArgs>) : IDisposable val output: Timers.ElapsedEventArgs
+val printfn: format: Printf.TextWriterFormat<'T> -> 'T
+property Timers.ElapsedEventArgs.SignalTime: DateTime with get
+<summary>Gets the date/time when the <see cref="E:System.Timers.Timer.Elapsed" /> event was raised.</summary> <returns>The time the <see cref="E:System.Timers.Timer.Elapsed" /> event was raised.</returns> val ignore: value: 'T -> unit
+type Console =
+ static member Beep: unit -> unit + 1 overload
+ static member Clear: unit -> unit
+ static member GetCursorPosition: unit -> struct (int * int)
+ static member MoveBufferArea: sourceLeft: int * sourceTop: int * sourceWidth: int * sourceHeight: int * targetLeft: int * targetTop: int -> unit + 1 overload
+ static member OpenStandardError: unit -> Stream + 1 overload
+ static member OpenStandardInput: unit -> Stream + 1 overload
+ static member OpenStandardOutput: unit -> Stream + 1 overload
+ static member Read: unit -> int
+ static member ReadKey: unit -> ConsoleKeyInfo + 1 overload
+ static member ReadLine: unit -> string
+ ...
+<summary>Represents the standard input, output, and error streams for console applications. This class cannot be inherited.</summary> Console.ReadLine() : string
+
+
+ The sample will output: Output - 2/15/2022 12:10:40 AM
+ Output - 2/15/2022 12:10:41 AM
+ Output - 2/15/2022 12:10:41 AM
+ Output - 2/15/2022 12:10:42 AM
+ Output - 2/15/2022 12:10:43 AM
+
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns a new event that triggers on the second and subsequent triggerings of the input event. + The Nth triggering of the input event passes the arguments from the N-1th and Nth triggering as + a pair. The argument passed to the N-1th triggering is held in hidden internal state until the + Nth triggering occurs. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Event.partition predicate sourceEvent
+ + + Parameters: +
'T -> bool
+ -
+ The function to determine which output event to trigger.
+
+ + + + sourceEvent + + : + IEvent<'Del, 'T>
+ -
+ The input event.
+
+ + + + Returns: + IEvent<'T> * IEvent<'T>
+
+ A tuple of events. The first is triggered when the predicate evaluates to true
+ and the second when the predicate evaluates to false.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns a new event that listens to the original event and triggers the + first resulting event if the application of the predicate to the event arguments + returned true, and the second event if it returned false. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Event.scan collector state sourceEvent
+ + + Parameters: +
'U -> 'T -> 'U
+ -
+ The function to update the state with each event value.
+
+ + + + state + + : + 'U
+ -
+ The initial state.
+
+ + + + sourceEvent + + : + IEvent<'Del, 'T>
+ -
+ The input event.
+
+ + + + Returns: + IEvent<'U>
+
+ An event that fires on the updated state values.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns a new event consisting of the results of applying the given accumulating function + to successive values triggered on the input event. An item of internal state + records the current value of the state parameter. The internal state is not locked during the + execution of the accumulation function, so care should be taken that the + input IEvent not triggered by multiple threads simultaneously. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Event.split splitter sourceEvent
+ + + Parameters: +
'T -> Choice<'U1, 'U2>
+ -
+ The function to transform event values into one of two types.
+
+ + + + sourceEvent + + : + IEvent<'Del, 'T>
+ -
+ The input event.
+
+ + + + Returns: + IEvent<'U1> * IEvent<'U2>
+
+ A tuple of events. The first fires whenever splitter evaluates to Choice1of1 and
+ the second fires whenever splitter evaluates to Choice2of2.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns a new event that listens to the original event and triggers the + first resulting event if the application of the function to the event arguments + returned a Choice1Of2, and the second event if it returns a Choice2Of2. + + |
+
+ + An asynchronous computation, which, when run, will eventually produce a value of type T, or else raises an exception. + +
++ + This type has no members. Asynchronous computations are normally specified either by using an async expression + or the static methods in the Async type. + + See also F# Language Guide - Async Workflows. + +
++ Holds static members for creating and manipulating asynchronous computations. +
++ + See also F# Language Guide - Async Workflows. + +
++ Static member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ Async.RunSynchronously(computation, ?timeout, ?cancellationToken)
+ + + Parameters: +
Async<'T>
+ -
+ The computation to run.
+
+ + + + ?timeout + + : + int
+ -
+ The amount of time in milliseconds to wait for the result of the
+ computation before raising a TimeoutException. If no value is provided
+ for timeout then a default of -1 is used to correspond to Timeout.Infinite.
+
+ + + + ?cancellationToken + + : + CancellationToken
+ -
+ The cancellation token to be associated with the computation.
+ If one is not supplied, the default cancellation token is used.
+
+ + + + Returns: + 'T
+
+ The result of the computation.
+ + |
+
+
+
+ + ++
+ If an exception occurs in the asynchronous computation then an exception is re-raised by this
+ function.
+
+ If no cancellation token is provided then the default cancellation token is used.
+
+ The computation is started on the current thread if SynchronizationContext.Current is null,
+ Thread.CurrentThread has Thread.IsThreadPoolThread
+ of
+ Example +++
+val printfn: format: Printf.TextWriterFormat<'T> -> 'T
+val result: Async<unit>
+val async: AsyncBuilder
+Multiple items
+type Async = + static member AsBeginEnd: computation: ('Arg -> Async<'T>) -> ('Arg * AsyncCallback * obj -> IAsyncResult) * (IAsyncResult -> 'T) * (IAsyncResult -> unit) + static member AwaitEvent: event: IEvent<'Del,'T> * ?cancelAction: (unit -> unit) -> Async<'T> (requires delegate and 'Del :> Delegate) + static member AwaitIAsyncResult: iar: IAsyncResult * ?millisecondsTimeout: int -> Async<bool> + static member AwaitTask: task: Task<'T> -> Async<'T> + 1 overload + static member AwaitWaitHandle: waitHandle: WaitHandle * ?millisecondsTimeout: int -> Async<bool> + static member CancelDefaultToken: unit -> unit + static member Catch: computation: Async<'T> -> Async<Choice<'T,exn>> + static member Choice: computations: Async<'T option> seq -> Async<'T option> + static member FromBeginEnd: beginAction: (AsyncCallback * obj -> IAsyncResult) * endAction: (IAsyncResult -> 'T) * ?cancelAction: (unit -> unit) -> Async<'T> + 3 overloads + static member FromContinuations: callback: (('T -> unit) * (exn -> unit) * (OperationCanceledException -> unit) -> unit) -> Async<'T> + ... -------------------- type Async<'T> static member Async.Sleep: dueTime: System.TimeSpan -> Async<unit>
+static member Async.Sleep: millisecondsDueTime: int -> Async<unit> static member Async.RunSynchronously: computation: Async<'T> * ?timeout: int * ?cancellationToken: System.Threading.CancellationToken -> 'T
+
+
+ Prints "A", "B" immediately, then "C", "D" in 1 second. result is set to 17.
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Async.Start(computation, ?cancellationToken)
+ + + Parameters: +
Async<unit>
+ -
+ The computation to run asynchronously.
+
+ + + + ?cancellationToken + + : + CancellationToken
+ -
+ The cancellation token to be associated with the computation.
+ If one is not supplied, the default cancellation token is used.
+
+ + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Starts the asynchronous computation in the thread pool. Do not await its result. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Async.StartAsTask(computation, ?taskCreationOptions, ?cancellationToken)
+ + + Parameters: +
Async<'T>
+
+ + + + ?taskCreationOptions + + : + TaskCreationOptions
+
+ + + + ?cancellationToken + + : + CancellationToken
+
+ + + + Returns: + Task<'T>
+
+ A Task that will be completed
+ in the corresponding state once the computation terminates (produces the result, throws exception or gets canceled)
+ + |
+
+
+
+ + +++ If no cancellation token is provided then the default cancellation token is used. + +
+ Example +++
+val printfn: format: Printf.TextWriterFormat<'T> -> 'T
+val t: System.Threading.Tasks.Task<unit>
+val async: AsyncBuilder
+Multiple items
+type Async = + static member AsBeginEnd: computation: ('Arg -> Async<'T>) -> ('Arg * AsyncCallback * obj -> IAsyncResult) * (IAsyncResult -> 'T) * (IAsyncResult -> unit) + static member AwaitEvent: event: IEvent<'Del,'T> * ?cancelAction: (unit -> unit) -> Async<'T> (requires delegate and 'Del :> Delegate) + static member AwaitIAsyncResult: iar: IAsyncResult * ?millisecondsTimeout: int -> Async<bool> + static member AwaitTask: task: Task<'T> -> Async<'T> + 1 overload + static member AwaitWaitHandle: waitHandle: WaitHandle * ?millisecondsTimeout: int -> Async<bool> + static member CancelDefaultToken: unit -> unit + static member Catch: computation: Async<'T> -> Async<Choice<'T,exn>> + static member Choice: computations: Async<'T option> seq -> Async<'T option> + static member FromBeginEnd: beginAction: (AsyncCallback * obj -> IAsyncResult) * endAction: (IAsyncResult -> 'T) * ?cancelAction: (unit -> unit) -> Async<'T> + 3 overloads + static member FromContinuations: callback: (('T -> unit) * (exn -> unit) * (OperationCanceledException -> unit) -> unit) -> Async<'T> + ... -------------------- type Async<'T> static member Async.Sleep: dueTime: System.TimeSpan -> Async<unit>
+static member Async.Sleep: millisecondsDueTime: int -> Async<unit> static member Async.StartAsTask: computation: Async<'T> * ?taskCreationOptions: System.Threading.Tasks.TaskCreationOptions * ?cancellationToken: System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T>
+System.Threading.Tasks.Task.Wait() : unit
+
+
+ Prints "A", then "D", "B" quickly in any order, then "C", "E" in 1 second.
+
+
+ System.Threading.Tasks.Task.Wait(timeout: System.TimeSpan) : bool System.Threading.Tasks.Task.Wait(cancellationToken: System.Threading.CancellationToken) : unit System.Threading.Tasks.Task.Wait(millisecondsTimeout: int) : bool System.Threading.Tasks.Task.Wait(timeout: System.TimeSpan, cancellationToken: System.Threading.CancellationToken) : bool System.Threading.Tasks.Task.Wait(millisecondsTimeout: int, cancellationToken: System.Threading.CancellationToken) : bool |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Async.StartChildAsTask(computation, ?taskCreationOptions)
+ + + Parameters: +
Async<'T>
+
+ + + + ?taskCreationOptions + + : + TaskCreationOptions
+
+ + + + Returns: + Async<Task<'T>>
+
+ + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ Async.StartImmediate(computation, ?cancellationToken)
+ + + Parameters: +
Async<unit>
+ -
+ The asynchronous computation to execute.
+
+ + + + ?cancellationToken + + : + CancellationToken
+ -
+ The CancellationToken to associate with the computation.
+ The default is used if this parameter is not provided.
+
+ + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Runs an asynchronous computation, starting immediately on the current operating system + thread. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Async.StartImmediateAsTask(computation, ?cancellationToken)
+ + + Parameters: +
Async<'T>
+ -
+ The asynchronous computation to execute.
+
+ + + + ?cancellationToken + + : + CancellationToken
+ -
+ The CancellationToken to associate with the computation.
+ The default is used if this parameter is not provided.
+
+ + + + Returns: + Task<'T>
+
+ A Task that will be completed
+ in the corresponding state once the computation terminates (produces the result, throws exception or gets canceled)
+ + |
+
+
+
+ + +++ If no cancellation token is provided then the default cancellation token is used. + You may prefer using this method if you want to achive a similar behviour to async await in C# as + async computation starts on the current thread with an ability to return a result. + + +
+ Example +++
+val printfn: format: Printf.TextWriterFormat<'T> -> 'T
+val t: System.Threading.Tasks.Task<unit>
+val async: AsyncBuilder
+Multiple items
+type Async = + static member AsBeginEnd: computation: ('Arg -> Async<'T>) -> ('Arg * AsyncCallback * obj -> IAsyncResult) * (IAsyncResult -> 'T) * (IAsyncResult -> unit) + static member AwaitEvent: event: IEvent<'Del,'T> * ?cancelAction: (unit -> unit) -> Async<'T> (requires delegate and 'Del :> Delegate) + static member AwaitIAsyncResult: iar: IAsyncResult * ?millisecondsTimeout: int -> Async<bool> + static member AwaitTask: task: Task<'T> -> Async<'T> + 1 overload + static member AwaitWaitHandle: waitHandle: WaitHandle * ?millisecondsTimeout: int -> Async<bool> + static member CancelDefaultToken: unit -> unit + static member Catch: computation: Async<'T> -> Async<Choice<'T,exn>> + static member Choice: computations: Async<'T option> seq -> Async<'T option> + static member FromBeginEnd: beginAction: (AsyncCallback * obj -> IAsyncResult) * endAction: (IAsyncResult -> 'T) * ?cancelAction: (unit -> unit) -> Async<'T> + 3 overloads + static member FromContinuations: callback: (('T -> unit) * (exn -> unit) * (OperationCanceledException -> unit) -> unit) -> Async<'T> + ... -------------------- type Async<'T> static member Async.Sleep: dueTime: System.TimeSpan -> Async<unit>
+static member Async.Sleep: millisecondsDueTime: int -> Async<unit> static member Async.StartImmediateAsTask: computation: Async<'T> * ?cancellationToken: System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T>
+System.Threading.Tasks.Task.Wait() : unit
+
+
+ Prints "A", "B", "D" immediately, then "C", "E" in 1 second.
+
+
+ System.Threading.Tasks.Task.Wait(timeout: System.TimeSpan) : bool System.Threading.Tasks.Task.Wait(cancellationToken: System.Threading.CancellationToken) : unit System.Threading.Tasks.Task.Wait(millisecondsTimeout: int) : bool System.Threading.Tasks.Task.Wait(timeout: System.TimeSpan, cancellationToken: System.Threading.CancellationToken) : bool System.Threading.Tasks.Task.Wait(millisecondsTimeout: int, cancellationToken: System.Threading.CancellationToken) : bool |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Async.StartWithContinuations(computation, continuation, exceptionContinuation, cancellationContinuation, ?cancellationToken)
+ + + Parameters: +
Async<'T>
+ -
+ The asynchronous computation to execute.
+
+ + + + continuation + + : + 'T -> unit
+ -
+ The function called on success.
+
+ + + + exceptionContinuation + + : + exn -> unit
+ -
+ The function called on exception.
+
+ + + + cancellationContinuation + + : + OperationCanceledException -> unit
+ -
+ The function called on cancellation.
+
+ + + + ?cancellationToken + + : + CancellationToken
+ -
+ The CancellationToken to associate with the computation.
+ The default is used if this parameter is not provided.
+
+ + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Runs an asynchronous computation, starting immediately on the current operating system + thread. Call one of the three continuations when the operation completes. + + |
+
+ Static member + | ++ Description + | +
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Creates an asynchronous computation that executes all given asynchronous computations in parallel, + returning the result of the first succeeding computation (one whose result is 'Some x'). + If all child computations complete with None, the parent computation also returns None. + + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Async.FromContinuations(callback)
+ + + Parameters: +
('T -> unit) * (exn -> unit) * (OperationCanceledException -> unit) -> unit
+ -
+ The function that accepts the current success, exception, and cancellation
+ continuations.
+
+ + + + Returns: + Async<'T>
+
+ An asynchronous computation that provides the callback with the current continuations.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Creates an asynchronous computation that captures the current + success, exception and cancellation continuations. The callback must + eventually call exactly one of the given continuations. + + |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Creates an asynchronous computation that runs the given computation and ignores + its result. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Async.Parallel(computations, ?maxDegreeOfParallelism)
+ + + Parameters: +
Async<'T> seq
+ -
+ A sequence of distinct computations to be parallelized.
+
+ + + + ?maxDegreeOfParallelism + + : + int
+ -
+ The maximum degree of parallelism in the parallel execution.
+
+ + + + Returns: + Async<'T[]>
+
+ A computation that returns an array of values from the sequence of input computations.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Creates an asynchronous computation that executes all the given asynchronous computations, + initially queueing each as work items and using a fork/join pattern. + + |
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Creates an asynchronous computation that executes all the given asynchronous computations, + initially queueing each as work items and using a fork/join pattern. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Async.Sequential(computations)
+ + + Parameters: +
Async<'T> seq
+ -
+ A sequence of distinct computations to be run in sequence.
+
+ + + + Returns: + Async<'T[]>
+
+ A computation that returns an array of values from the sequence of input computations.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Creates an asynchronous computation that executes all the given asynchronous computations sequentially. + + |
+
+ Static member + | ++ Description + | +||
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Async.AwaitEvent(event, ?cancelAction)
+ + + Parameters: +
IEvent<'Del, 'T>
+ -
+ The event to handle once.
+
+ + + + ?cancelAction + + : + unit -> unit
+ -
+ An optional function to execute instead of cancelling when a
+ cancellation is issued.
+
+ + + + Returns: + Async<'T>
+
+ An asynchronous computation that waits for the event to be invoked.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Creates an asynchronous computation that waits for a single invocation of a CLI + event by adding a handler to the event. Once the computation completes or is + cancelled, the handler is removed from the event. + + |
+ ||
+
+
+
+
+
+
+
+ Full Usage:
+
+ Async.AwaitIAsyncResult(iar, ?millisecondsTimeout)
+ + + Parameters: +
IAsyncResult
+ -
+ The IAsyncResult to wait on.
+
+ + + + ?millisecondsTimeout + + : + int
+ -
+ The timeout value in milliseconds. If one is not provided
+ then the default value of -1 corresponding to Timeout.Infinite.
+
+ + + + Returns: + Async<bool>
+
+ An asynchronous computation that waits on the given IAsyncResult .
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Creates an asynchronous computation that will wait on the IAsyncResult. + + |
+ ||
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Return an asynchronous computation that will wait for the given task to complete and return + its result. + + |
+ ||
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Return an asynchronous computation that will wait for the given task to complete and return + its result. + + |
+ ||
+
+
+
+
+
+
+
+ Full Usage:
+
+ Async.AwaitWaitHandle(waitHandle, ?millisecondsTimeout)
+ + + Parameters: +
WaitHandle
+ -
+ The WaitHandle that can be signalled.
+
+ + + + ?millisecondsTimeout + + : + int
+ -
+ The timeout value in milliseconds. If one is not provided
+ then the default value of -1 corresponding to Timeout.Infinite.
+
+ + + + Returns: + Async<bool>
+
+ An asynchronous computation that waits on the given WaitHandle .
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Creates an asynchronous computation that will wait on the given WaitHandle. + + |
+ ||
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Creates an asynchronous computation that will sleep for the given time. This is scheduled + using a System.Threading.Timer object. The operation will not block operating system threads + for the duration of the wait. + + + |
+
+ + ArgumentOutOfRangeException + + | ++ Thrown when the due time is negative. + | +
+
async {
+ printfn "A"
+ do! Async.Sleep(TimeSpan(0, 0, 1))
+ printfn "B"
+ } |> Async.Start
+ printfn "C"
+
+
+
+
+
+ + + Creates an asynchronous computation that will sleep for the given time. This is scheduled + using a System.Threading.Timer object. The operation will not block operating system threads + for the duration of the wait. + +
+int
+ + The number of milliseconds to sleep. +
+Async<unit>
+ + An asynchronous computation that will sleep for the given time. +
++ + ArgumentOutOfRangeException + + | ++ Thrown when the due time is negative + and not infinite. + | +
+
async {
+ printfn "A"
+ do! Async.Sleep(1000)
+ printfn "B"
+ } |> Async.Start
+
+ printfn "C"
+
++ Static member + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Async.CancelDefaultToken()
+ + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Raises the cancellation condition for the most recent set of asynchronous computations started + without any specific CancellationToken. Replaces the global CancellationTokenSource with a new + global token source for any asynchronous computations created after this point without any + specific CancellationToken. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Async.CancellationToken
+ + + + Returns: + Async<CancellationToken>
+
+ An asynchronous computation capable of retrieving the CancellationToken from a computation
+ expression.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Creates an asynchronous computation that returns the CancellationToken governing the execution + of the computation. + + |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Creates an asynchronous computation that executes |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Async.DefaultCancellationToken
+ + + + Returns: + CancellationToken
+
+ The default CancellationToken.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Gets the default cancellation token for executing asynchronous computations. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Async.OnCancel(interruption)
+ + + Parameters: +
unit -> unit
+ -
+ The function that is executed on the thread performing the
+ cancellation.
+
+ + + + Returns: + Async<IDisposable>
+
+ An asynchronous computation that triggers the interruption if it is cancelled
+ before being disposed.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Generates a scoped, cooperative cancellation handler for use within an asynchronous workflow. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Async.StartChild(computation, ?millisecondsTimeout)
+ + + Parameters: +
Async<'T>
+ -
+ The child computation.
+
+ + + + ?millisecondsTimeout + + : + int
+ -
+ The timeout value in milliseconds. If one is not provided
+ then the default value of -1 corresponding to Timeout.Infinite.
+
+ + + + Returns: + Async<Async<'T>>
+
+ A new computation that waits for the input computation to finish.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Starts a child computation within an asynchronous workflow. + This allows multiple asynchronous computations to be executed simultaneously. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Async.TryCancelled(computation, compensation)
+ + + Parameters: +
Async<'T>
+ -
+ The input asynchronous computation.
+
+ + + + compensation + + : + OperationCanceledException -> unit
+ -
+ The function to be run if the computation is cancelled.
+
+ + + + Returns: + Async<'T>
+
+ An asynchronous computation that runs the compensation if the input computation
+ is cancelled.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Creates an asynchronous computation that executes |
+
+ Static member + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Async.SwitchToContext(syncContext)
+ + + Parameters: +
SynchronizationContext
+ -
+ The synchronization context to accept the posted computation.
+
+ + + + Returns: + Async<unit>
+
+ An asynchronous computation that uses the syncContext context to execute.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Creates an asynchronous computation that runs + its continuation using syncContext.Post. If syncContext is null + then the asynchronous computation is equivalent to SwitchToThreadPool(). + + |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Creates an asynchronous computation that creates a new thread and runs + its continuation in that thread. + + |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Creates an asynchronous computation that queues a work item that runs + its continuation. + + |
+
+ Static member + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Async.AsBeginEnd(computation)
+ + + Parameters: +
'Arg -> Async<'T>
+ -
+ A function generating the asynchronous computation to split into the traditional
+ .NET Asynchronous Programming Model.
+
+ + + + Returns: + ('Arg * AsyncCallback * obj -> IAsyncResult) * (IAsyncResult -> 'T) * (IAsyncResult -> unit)
+
+ A tuple of the begin, end, and cancel members.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Creates three functions that can be used to implement the .NET 1.0 Asynchronous + Programming Model (APM) for a given asynchronous computation. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Async.FromBeginEnd(arg1, arg2, arg3, beginAction, endAction, ?cancelAction)
+ + + Parameters: +
'Arg1
+ -
+ The first argument for the operation.
+
+ + + + arg2 + + : + 'Arg2
+ -
+ The second argument for the operation.
+
+ + + + arg3 + + : + 'Arg3
+ -
+ The third argument for the operation.
+
+ + + + beginAction + + : + 'Arg1 * 'Arg2 * 'Arg3 * AsyncCallback * obj -> IAsyncResult
+ -
+ The function initiating a traditional CLI asynchronous operation.
+
+ + + + endAction + + : + IAsyncResult -> 'T
+ -
+ The function completing a traditional CLI asynchronous operation.
+
+ + + + ?cancelAction + + : + unit -> unit
+ -
+ An optional function to be executed when a cancellation is requested.
+
+ + + + Returns: + Async<'T>
+
+ An asynchronous computation wrapping the given Begin/End functions.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Creates an asynchronous computation in terms of a Begin/End pair of actions in + the style used in .NET 2.0 APIs. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Async.FromBeginEnd(arg1, arg2, beginAction, endAction, ?cancelAction)
+ + + Parameters: +
'Arg1
+ -
+ The first argument for the operation.
+
+ + + + arg2 + + : + 'Arg2
+ -
+ The second argument for the operation.
+
+ + + + beginAction + + : + 'Arg1 * 'Arg2 * AsyncCallback * obj -> IAsyncResult
+ -
+ The function initiating a traditional CLI asynchronous operation.
+
+ + + + endAction + + : + IAsyncResult -> 'T
+ -
+ The function completing a traditional CLI asynchronous operation.
+
+ + + + ?cancelAction + + : + unit -> unit
+ -
+ An optional function to be executed when a cancellation is requested.
+
+ + + + Returns: + Async<'T>
+
+ An asynchronous computation wrapping the given Begin/End functions.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Creates an asynchronous computation in terms of a Begin/End pair of actions in + the style used in .NET 2.0 APIs. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Async.FromBeginEnd(arg, beginAction, endAction, ?cancelAction)
+ + + Parameters: +
'Arg1
+ -
+ The argument for the operation.
+
+ + + + beginAction + + : + 'Arg1 * AsyncCallback * obj -> IAsyncResult
+ -
+ The function initiating a traditional CLI asynchronous operation.
+
+ + + + endAction + + : + IAsyncResult -> 'T
+ -
+ The function completing a traditional CLI asynchronous operation.
+
+ + + + ?cancelAction + + : + unit -> unit
+ -
+ An optional function to be executed when a cancellation is requested.
+
+ + + + Returns: + Async<'T>
+
+ An asynchronous computation wrapping the given Begin/End functions.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Creates an asynchronous computation in terms of a Begin/End pair of actions in + the style used in .NET 2.0 APIs. + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Async.FromBeginEnd(beginAction, endAction, ?cancelAction)
+ + + Parameters: +
AsyncCallback * obj -> IAsyncResult
+ -
+ The function initiating a traditional CLI asynchronous operation.
+
+ + + + endAction + + : + IAsyncResult -> 'T
+ -
+ The function completing a traditional CLI asynchronous operation.
+
+ + + + ?cancelAction + + : + unit -> unit
+ -
+ An optional function to be executed when a cancellation is requested.
+
+ + + + Returns: + Async<'T>
+
+ An asynchronous computation wrapping the given Begin/End functions.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Creates an asynchronous computation in terms of a Begin/End pair of actions in + the style used in CLI APIs. + + + |
+
+ The type of the async
operator, used to build workflows for asynchronous computations.
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Bind
+ + + Parameters: +
Async<'T>
+ -
+ The computation to provide an unbound result.
+
+ + + + binder + + : + 'T -> Async<'U>
+ -
+ The function to bind the result of computation .
+
+ + + + Returns: + Async<'U>
+
+ An asynchronous computation that performs a monadic bind on the result
+ of computation .
+ + Modifiers: + inline + + Type parameters: + 'T, 'U + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Creates an asynchronous computation that runs |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Combine
+ + + Parameters: +
Async<unit>
+ -
+ The first part of the sequenced computation.
+
+ + + + computation2 + + : + Async<'T>
+ -
+ The second part of the sequenced computation.
+
+ + + + Returns: + Async<'T>
+
+ An asynchronous computation that runs both of the computations sequentially.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Creates an asynchronous computation that first runs |
+
+
+
+
+
+
+ |
+
+
+
+ + +++ A cancellation check is performed when the computation is executed. + + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.For
+ + + Parameters: +
'T seq
+ -
+ The sequence to enumerate.
+
+ + + + body + + : + 'T -> Async<unit>
+ -
+ A function to take an item from the sequence and create
+ an asynchronous computation. Can be seen as the body of the for expression.
+
+ + + + Returns: + Async<unit>
+
+ An asynchronous computation that will enumerate the sequence and run body
+ for each element.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Creates an asynchronous computation that enumerates the sequence |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Return
+ + + Parameters: +
'T
+ -
+ The value to return from the computation.
+
+ + + + Returns: + Async<'T>
+
+ An asynchronous computation that returns value when executed.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
+ A cancellation check is performed when the computation is executed.
+
+ The existence of this method permits the use of
|
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.TryFinally
+ + + Parameters: +
Async<'T>
+ -
+ The input computation.
+
+ + + + compensation + + : + unit -> unit
+ -
+ The action to be run after computation completes or raises an
+ exception (including cancellation).
+
+ + + + Returns: + Async<'T>
+
+ An asynchronous computation that executes computation and compensation afterwards or
+ when an exception is raised.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Creates an asynchronous computation that runs |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.TryWith
+ + + Parameters: +
Async<'T>
+ -
+ The input computation.
+
+ + + + catchHandler + + : + exn -> Async<'T>
+ -
+ The function to run when computation throws an exception.
+
+ + + + Returns: + Async<'T>
+
+ An asynchronous computation that executes computation and calls catchHandler if an
+ exception is thrown.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Creates an asynchronous computation that runs |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Using
+ + + Parameters: +
'T
+ -
+ The resource to be used and disposed.
+
+ + + + binder + + : + 'T -> Async<'U>
+ -
+ The function that takes the resource and returns an asynchronous
+ computation.
+
+ + + + Returns: + Async<'U>
+
+ An asynchronous computation that binds and eventually disposes resource .
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Creates an asynchronous computation that runs |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.While
+ + + Parameters: +
unit -> bool
+ -
+ The function to determine when to stop executing computation .
+
+ + + + computation + + : + Async<unit>
+ -
+ The function to be executed. Equivalent to the body
+ of a while expression.
+
+ + + + Returns: + Async<unit>
+
+ An asynchronous computation that behaves similarly to a while loop when run.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Creates an asynchronous computation that runs |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ A cancellation check is performed when the computation is executed.
+
+ The existence of this method permits the use of empty |
+
+ A handle to a capability to reply to a PostAndReply message. +
++ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Reply
+ + + Parameters: +
'Reply
+ -
+ The value to send.
+
+ + + |
+
+
+
+ + ++
|
+
+ Event implementations for an arbitrary type of delegate. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ DelegateEvent()
+ + + + Returns: + DelegateEvent<'Delegate>
+
+ The event object.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Creates an event object suitable for implementing an arbitrary type of delegate. + + |
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Trigger
+ + + Parameters: +
obj[]
+ -
+ The parameters for the event.
+
+ + + |
+ + + | +
+ Event implementations for the IEvent<_> type. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Trigger
+ + + Parameters: +
'T
+ -
+ The event parameters.
+
+ + + |
+
+
+
+ + ++
|
+
+ Event implementations for a delegate types following the standard .NET Framework convention of a first 'sender' argument. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Trigger
+ + + Parameters: +
obj
+ -
+ The object triggering the event.
+
+ + + + args + + : + 'Args
+ -
+ The parameters for the event.
+
+ + + |
+ + + | +
+ A delegate type associated with the F# event type IEvent<_>
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Invoke
+ + + Parameters: +
obj
+
+ + + + args + + : + 'T
+
+ + + Modifiers: + abstract + + |
+
+
|
+
+ A message-processing agent which executes an asynchronous computation. +
++ The agent encapsulates a message queue that supports multiple-writers and + a single reader agent. Writers send messages to the agent by using the Post + method and its variations. + + The agent may wait for messages using the Receive or TryReceive methods or + scan through all available messages using the Scan or TryScan method. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ MailboxProcessor(body, ?cancellationToken)
+ + + Parameters: +
MailboxProcessor<'Msg> -> Async<unit>
+ -
+ The function to produce an asynchronous computation that will be executed
+ as the read loop for the MailboxProcessor when Start is called.
+
+ + + + ?cancellationToken + + : + CancellationToken
+ -
+ An optional cancellation token for the body .
+ Defaults to Async.DefaultCancellationToken .
+
+ + + + Returns: + MailboxProcessor<'Msg>
+
+ The created MailboxProcessor.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Creates an agent. The |
+
+ Instance member + | ++ Description + | +||
+
+
+
+
+
+
+
+ |
+ + + | +||
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.DefaultTimeout
+ + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Raises a timeout exception if a message not received in this amount of time. By default + no timeout is used. + + |
+ ||
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Dispose
+ + + |
+ + + | +||
+
+
+
+
+
+ |
+ + + | +||
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Post
+ + + Parameters: +
'Msg
+ -
+ The message to post.
+
+ + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Posts a message to the message queue of the MailboxProcessor, asynchronously. + + |
+ ||
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.PostAndAsyncReply
+ + + Parameters: +
AsyncReplyChannel<'Reply> -> 'Msg
+ -
+ The function to incorporate the AsyncReplyChannel into
+ the message to be sent.
+
+ + + + ?timeout + + : + int
+ -
+ An optional timeout parameter (in milliseconds) to wait for a reply message.
+ Defaults to -1 which corresponds to Timeout.Infinite.
+
+ + + + Returns: + Async<'Reply>
+
+ An asynchronous computation that will wait for the reply from the agent.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Posts a message to an agent and await a reply on the channel, asynchronously. + + |
+ ||
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.PostAndReply
+ + + Parameters: +
AsyncReplyChannel<'Reply> -> 'Msg
+ -
+ The function to incorporate the AsyncReplyChannel into
+ the message to be sent.
+
+ + + + ?timeout + + : + int
+ -
+ An optional timeout parameter (in milliseconds) to wait for a reply message.
+ Defaults to -1 which corresponds to Timeout.Infinite.
+
+ + + + Returns: + 'Reply
+
+ The reply from the agent.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Posts a message to an agent and await a reply on the channel, synchronously. + + |
+ ||
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.PostAndTryAsyncReply
+ + + Parameters: +
AsyncReplyChannel<'Reply> -> 'Msg
+ -
+ The function to incorporate the AsyncReplyChannel into
+ the message to be sent.
+
+ + + + ?timeout + + : + int
+ -
+ An optional timeout parameter (in milliseconds) to wait for a reply message.
+ Defaults to -1 which corresponds to Timeout.Infinite.
+
+ + + + Returns: + Async<'Reply option>
+
+ An asynchronous computation that will return the reply or None if the timeout expires.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Like AsyncPostAndReply, but returns None if no reply within the timeout period. + + |
+ ||
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Receive
+ + + Parameters: +
int
+ -
+ An optional timeout in milliseconds. Defaults to -1 which corresponds
+ to Timeout.Infinite.
+
+ + + + Returns: + Async<'Msg>
+
+ An asynchronous computation that returns the received message.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Waits for a message. This will consume the first message in arrival order. + + |
+
+ + TimeoutException + + | ++ Thrown when the timeout is exceeded. + | +
+
+
+
+ this.Scan
+
+
+
+
+ this.Scan
+ 'Msg -> Async<'T> option
+ -
+ The function to return None if the message is to be skipped
+ or Some if the message is to be processed and removed from the queue.
+
+ int
+ -
+ An optional timeout in milliseconds. Defaults to -1 which corresponds
+ to Timeout.Infinite.
+
+ Async<'T>
+
+ An asynchronous computation that scanner
built off the read message.
+
+ Scans for a message by looking through messages in arrival order until scanner
+ returns a Some value. Other messages remain in the queue.
+
+ Returns None if a timeout is given and the timeout is exceeded. + + This method is for use within the body of the agent. For each agent, at most + one concurrent reader may be active, so no more than one concurrent call to + Receive, TryReceive, Scan and/or TryScan may be active. +
+'Msg -> Async<'T> option
+ + The function to return None if the message is to be skipped + or Some if the message is to be processed and removed from the queue. +
+int
+ + An optional timeout in milliseconds. Defaults to -1 which corresponds + to Timeout.Infinite. +
+Async<'T>
+
+ An asynchronous computation that scanner
built off the read message.
+
+ + TimeoutException + + | ++ Thrown when the timeout is exceeded. + | +
+
+
+
+ this.Start
+
+
+
+
+ this.Start
+
+
+
+
+ this.StartImmediate
+
+
+
+
+ this.StartImmediate
+ + Starts the agent immediately on the current operating system thread. +
+
+
+
+
+ this.TryPostAndReply
+
+
+
+
+ this.TryPostAndReply
+ AsyncReplyChannel<'Reply> -> 'Msg
+ -
+ The function to incorporate the AsyncReplyChannel into
+ the message to be sent.
+
+ int
+ -
+ An optional timeout parameter (in milliseconds) to wait for a reply message.
+ Defaults to -1 which corresponds to Timeout.Infinite.
+
+ 'Reply option
+
+ The reply from the agent or None if the timeout expires.
+ + Like PostAndReply, but returns None if no reply within the timeout period. +
+AsyncReplyChannel<'Reply> -> 'Msg
+ + The function to incorporate the AsyncReplyChannel into + the message to be sent. +
+int
+ + An optional timeout parameter (in milliseconds) to wait for a reply message. + Defaults to -1 which corresponds to Timeout.Infinite. +
+'Reply option
+ + The reply from the agent or None if the timeout expires. +
+
+
+
+
+ this.TryReceive
+
+
+
+
+ this.TryReceive
+ int
+ -
+ An optional timeout in milliseconds. Defaults to -1 which
+ corresponds to Timeout.Infinite.
+
+ Async<'Msg option>
+
+ An asynchronous computation that returns the received message or
+ None if the timeout is exceeded.
+ + Waits for a message. This will consume the first message in arrival order. +
++ This method is for use within the body of the agent. + + Returns None if a timeout is given and the timeout is exceeded. + + This method is for use within the body of the agent. For each agent, at most + one concurrent reader may be active, so no more than one concurrent call to + Receive, TryReceive, Scan and/or TryScan may be active. +
+int
+ + An optional timeout in milliseconds. Defaults to -1 which + corresponds to Timeout.Infinite. +
+
+
+
+
+ this.TryScan
+
+
+
+
+ this.TryScan
+ 'Msg -> Async<'T> option
+ -
+ The function to return None if the message is to be skipped
+ or Some if the message is to be processed and removed from the queue.
+
+ int
+ -
+ An optional timeout in milliseconds. Defaults to -1 which corresponds
+ to Timeout.Infinite.
+
+ Async<'T option>
+
+ An asynchronous computation that scanner
built off the read message.
+
+ Scans for a message by looking through messages in arrival order until scanner
+ returns a Some value. Other messages remain in the queue.
+
+ This method is for use within the body of the agent. For each agent, at most + one concurrent reader may be active, so no more than one concurrent call to + Receive, TryReceive, Scan and/or TryScan may be active. +
+'Msg -> Async<'T> option
+ + The function to return None if the message is to be skipped + or Some if the message is to be processed and removed from the queue. +
+int
+ + An optional timeout in milliseconds. Defaults to -1 which corresponds + to Timeout.Infinite. +
++ Static member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ MailboxProcessor.Start(body, ?cancellationToken)
+ + + Parameters: +
MailboxProcessor<'Msg> -> Async<unit>
+ -
+ The function to produce an asynchronous computation that will be executed
+ as the read loop for the MailboxProcessor when Start is called.
+
+ + + + ?cancellationToken + + : + CancellationToken
+ -
+ An optional cancellation token for the body .
+ Defaults to Async.DefaultCancellationToken .
+
+ + + + Returns: + MailboxProcessor<'Msg>
+
+ The created MailboxProcessor.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Creates and starts an agent. The |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ MailboxProcessor.StartImmediate(body, ?cancellationToken)
+ + + Parameters: +
MailboxProcessor<'Msg> -> Async<unit>
+ -
+ The function to produce an asynchronous computation that will be executed
+ as the read loop for the MailboxProcessor when StartImmediately is called.
+
+ + + + ?cancellationToken + + : + CancellationToken
+ -
+ An optional cancellation token for the body .
+ Defaults to Async.DefaultCancellationToken .
+
+ + + + Returns: + MailboxProcessor<'Msg>
+
+ The created MailboxProcessor.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Creates and starts an agent immediately on the current operating system thread. The |
+
+ First class event values for arbitrary delegate types. +
++ F# gives special status to member properties compatible with type IDelegateEvent and + tagged with the CLIEventAttribute. In this case the F# compiler generates appropriate + CLI metadata to make the member appear to other CLI languages as a CLI event. +
++ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.AddHandler
+ + + Parameters: +
'Delegate
+ -
+ A delegate to be invoked when the event is fired.
+
+ + + Modifiers: + abstract + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Connect a handler delegate object to the event. A handler can + be later removed using RemoveHandler. The listener will + be invoked when the event is fired. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.RemoveHandler
+ + + Parameters: +
'Delegate
+ -
+ The delegate to be removed from the event listener store.
+
+ + + Modifiers: + abstract + + |
+
+
+
+ + ++
|
+
+ First-class listening points (i.e. objects that permit you to register a callback + activated when the event is triggered). +
++ First class event values for CLI events conforming to CLI Framework standards. +
++ Extensions related to Lazy values. +
++ Type extension + | ++ Description + | +
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Creates a lazy computation that evaluates to the result of the given function when forced. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Lazy.CreateFromValue(value)
+ + + Parameters: +
'T
+ -
+ The input value.
+
+ + + + Returns: + Lazy<'T>
+
+ The created Lazy object.
+ + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Force
+ + + Parameters: +
unit
+
+ + + + Returns: + 'T
+
+ The value of the Lazy object.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Forces the execution of this value and return its result. Same as Value. Mutual exclusion is used to + prevent other threads also computing the value. + + |
+
+ Contains operations for working with first class event and other observable objects. +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Observable.add callback source
+ + + Parameters: +
'T -> unit
+ -
+ The function to be called on each observation.
+
+ + + + source + + : + IObservable<'T>
+ -
+ The input Observable.
+
+ + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Creates an observer which permanently subscribes to the given observable and which calls + the given function for each observation. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Observable.choose chooser source
+ + + Parameters: +
'T -> 'U option
+ -
+ The function that returns Some for observations to be propagated
+ and None for observations to ignore.
+
+ + + + source + + : + IObservable<'T>
+ -
+ The input Observable.
+
+ + + + Returns: + IObservable<'U>
+
+ An Observable that only propagates some of the observations from the source.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns an observable which chooses a projection of observations from the source
+ using the given function. The returned object will trigger observations |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Observable.filter predicate source
+ + + Parameters: +
'T -> bool
+ -
+ The function to apply to observations to determine if it should
+ be kept.
+
+ + + + source + + : + IObservable<'T>
+ -
+ The input Observable.
+
+ + + + Returns: + IObservable<'T>
+
+ An Observable that filters observations based on filter .
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns an observable which filters the observations of the source + by the given function. The observable will see only those observations + for which the predicate returns true. The predicate is executed once for + each subscribed observer. The returned object also propagates error + observations arising from the source and completes when the source completes. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Observable.map mapping source
+ + + Parameters: +
'T -> 'U
+ -
+ The function applied to observations from the source.
+
+ + + + source + + : + IObservable<'T>
+ -
+ The input Observable.
+
+ + + + Returns: + IObservable<'U>
+
+ An Observable of the type specified by mapping .
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns an observable which transforms the observations of the source by the + given function. The transformation function is executed once for each + subscribed observer. The returned object also propagates error observations + arising from the source and completes when the source completes. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Observable.merge source1 source2
+ + + Parameters: +
IObservable<'T>
+ -
+ The first Observable.
+
+ + + + source2 + + : + IObservable<'T>
+ -
+ The second Observable.
+
+ + + + Returns: + IObservable<'T>
+
+ An Observable that propagates information from both sources.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns an observable for the merged observations from the sources. + The returned object propagates success and error values arising + from either source and completes when both the sources have completed. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Observable.pairwise source
+ + + Parameters: +
IObservable<'T>
+ -
+ The input Observable.
+
+ + + + Returns: + IObservable<'T * 'T>
+
+ An Observable that triggers on successive pairs of observations from the input Observable.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns a new observable that triggers on the second and subsequent triggerings of the input observable. + The Nth triggering of the input observable passes the arguments from the N-1th and Nth triggering as + a pair. The argument passed to the N-1th triggering is held in hidden internal state until the + Nth triggering occurs. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Observable.partition predicate source
+ + + Parameters: +
'T -> bool
+ -
+ The function to determine which output Observable will trigger
+ a particular observation.
+
+ + + + source + + : + IObservable<'T>
+ -
+ The input Observable.
+
+ + + + Returns: + IObservable<'T> * IObservable<'T>
+
+ A tuple of Observables. The first triggers when the predicate returns true, and
+ the second triggers when the predicate returns false.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns two observables which partition the observations of the source by + the given function. The first will trigger observations for those values + for which the predicate returns true. The second will trigger observations + for those values where the predicate returns false. The predicate is + executed once for each subscribed observer. Both also propagate all error + observations arising from the source and each completes when the source + completes. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Observable.scan collector state source
+ + + Parameters: +
'U -> 'T -> 'U
+ -
+ The function to update the state with each observation.
+
+ + + + state + + : + 'U
+ -
+ The initial state.
+
+ + + + source + + : + IObservable<'T>
+ -
+ The input Observable.
+
+ + + + Returns: + IObservable<'U>
+
+ An Observable that triggers on the updated state values.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns an observable which, for each observer, allocates an item of state + and applies the given accumulating function to successive values arising from + the input. The returned object will trigger observations for each computed + state value, excluding the initial value. The returned object propagates + all errors arising from the source and completes when the source completes. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Observable.split splitter source
+ + + Parameters: +
'T -> Choice<'U1, 'U2>
+ -
+ The function that takes an observation an transforms
+ it into one of the two output Choice types.
+
+ + + + source + + : + IObservable<'T>
+ -
+ The input Observable.
+
+ + + + Returns: + IObservable<'U1> * IObservable<'U2>
+
+ A tuple of Observables. The first triggers when splitter returns Choice1of2
+ and the second triggers when splitter returns Choice2of2.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns two observables which split the observations of the source by the
+ given function. The first will trigger observations |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Observable.subscribe callback source
+ + + Parameters: +
'T -> unit
+ -
+ The function to be called on each observation.
+
+ + + + source + + : + IObservable<'T>
+ -
+ The input Observable.
+
+ + + + Returns: + IDisposable
+
+ An object that will remove the callback if disposed.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Creates an observer which subscribes to the given observable and which calls + the given function for each observation. + + |
+
+ + Contains methods to build tasks using the F# computation expression syntax + +
++ Instance member + | ++ Description + | +
+
+
+
+
+
+ |
+ + + | +
+ Static member + | ++ Description + | +
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + The entry point for the dynamic implementation of the corresponding operation. Do not use directly, only used when executing quotations that involve tasks or other reflective execution of F# code. + + + |
+
+ + Contains methods to build tasks using the F# computation expression syntax + +
++ Instance member + | ++ Description + | +
+ + | ++ + | +
+
+
+
+
+
+ |
+ + + | +
+ + | ++ + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Return
+ + + Parameters: +
'T
+
+ + + + Returns: + TaskCode<'T, 'T>
+
+ + Modifiers: + inline + + Type parameters: + 'T + |
+ + + | +
+ + | ++ + | +
+ + | ++ + | +
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Specifies a unit of task code which binds to the resource implementing IAsyncDisposable and disposes it asynchronously + + + |
+
+ + | ++ + | +
+
+
+
+
+
+ |
+ + + | +
+ + Contains high-priority overloads for the `task` computation expression builder. + +
++ Type extension + | ++ Description + | +
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Specifies a unit of task code which draws a result from a task then calls a continuation. + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ TaskBuilderBase.BindDynamic(sm, task, continuation)
+ + + Parameters: +
byref<TaskStateMachine<'TOverall>>
+
+ + + + task + + : + Task<'TResult1>
+
+ + + + continuation + + : + 'TResult1 -> TaskCode<'TOverall, 'TResult2>
+
+ + + + Returns: + bool
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + The entry point for the dynamic implementation of the corresponding operation. Do not use directly, only used when executing quotations that involve tasks or other reflective execution of F# code. + + + |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Extended Type:
+
|
+
+ + Contains low-priority overloads for the `task` computation expression builder. + +
++ Type extension + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Bind
+ + + Parameters: +
^TaskLike
+
+ + + + continuation + + : + 'TResult1 -> TaskCode<'TOverall, 'TResult2>
+
+ + + + Returns: + TaskCode<'TOverall, 'TResult2>
+
+ + Modifiers: + inline + + Type parameters: + ^TaskLike, 'TResult1, 'TResult2, ^Awaiter, 'TOverall + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Specifies a unit of task code which draws a result from a task-like value + satisfying the GetAwaiter pattern and calls a continuation. + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ TaskBuilderBase.BindDynamic(sm, task, continuation)
+ + + Parameters: +
byref<TaskStateMachine<'TOverall>>
+
+ + + + task + + : + ^TaskLike
+
+ + + + continuation + + : + 'TResult1 -> TaskCode<'TOverall, 'TResult2>
+
+ + + + Returns: + bool
+
+ + Modifiers: + inline + + Type parameters: + ^TaskLike, 'TResult1, 'TResult2, ^Awaiter, 'TOverall + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + The entry point for the dynamic implementation of the corresponding operation. Do not use directly, only used when executing quotations that involve tasks or other reflective execution of F# code. + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.ReturnFrom
+ + + Parameters: +
^TaskLike
+
+ + + + Returns: + TaskCode<'T, 'T>
+
+ + Modifiers: + inline + + Type parameters: + ^TaskLike, ^Awaiter, 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Specifies a unit of task code which draws its result from a task-like value + satisfying the GetAwaiter pattern. + + + |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Specifies a unit of task code which binds to the resource implementing IDisposable and disposes it synchronously + + + |
+
+ + Contains medium-priority overloads for the `task` computation expression builder. + +
++ Type extension + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Bind
+ + + Parameters: +
Async<'TResult1>
+
+ + + + continuation + + : + 'TResult1 -> TaskCode<'TOverall, 'TResult2>
+
+ + + + Returns: + TaskCode<'TOverall, 'TResult2>
+
+ + Modifiers: + inline + + Type parameters: + 'TResult1, 'TOverall, 'TResult2 + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Specifies a unit of task code which draws a result from an F# async value then calls a continuation. + + + |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Specifies a unit of task code which draws a result from an F# async value. + + + |
+
+ Modules + | ++ Description + | +
+ + + + HighPriority + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Contains high-priority overloads for the `task` computation expression builder. + + + |
+
+ + + + LowPriority + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Contains low-priority overloads for the `task` computation expression builder. + + + |
+
+ + + + MediumPriority + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Contains medium-priority overloads for the `task` computation expression builder. + + + |
+
+ + Contains the `task` computation expression builder. + +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Builds a task using computation expression syntax which switches to execute on a background thread if not + already doing so. + + + |
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
|
+
+ + A special compiler-recognised delegate type for specifying blocks of task code + with access to the state machine. + +
++ + Represents the runtime continuation of a task state machine created dynamically + +
++ + This is used by the compiler as a template for creating state machine structs + +
++ + The extra data stored in ResumableStateMachine for tasks + +
++ Record Field + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ MethodBuilder
+ + + + Field type: + AsyncTaskMethodBuilder<'T>
+
+ + Modifiers: + mutable + + |
+
+
+
+
+
+ + + Holds the MethodBuilder for the state machine + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Result
+ + + + Field type: + 'T
+
+ + Modifiers: + mutable + + |
+
+
+
+
+
+ + + Holds the final result of the state machine + + + |
+
+ A module of extension members providing asynchronous operations for some basic Web operations. +
++ Type extension + | ++ Description + | +
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns an asynchronous computation that, when run, will wait for the download of the given URI. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.AsyncDownloadFile
+ + + Parameters: +
Uri
+ -
+ The URI to retrieve.
+
+ + + + fileName + + : + string
+ -
+ The file name to save download to.
+
+ + + + Returns: + Async<unit>
+
+ An asynchronous computation that will wait for the download of the URI to specified file.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns an asynchronous computation that, when run, will wait for the download of the given URI to specified file. + + |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns an asynchronous computation that, when run, will wait for the download of the given URI. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.AsyncGetResponse
+ + + Parameters: +
unit
+
+ + + + Returns: + Async<WebResponse>
+
+ An asynchronous computation that waits for response to the WebRequest .
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns an asynchronous computation that, when run, will wait for a response to the given WebRequest. + + |
+
+ + Library functionality for asynchronous programming, events and agents. See also + Asynchronous Programming, + Events and + Lazy Expressions in the + F# Language Guide. + +
++ Type/Module + | ++ Description + | +
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Holds static members for creating and manipulating asynchronous computations. + + |
+
+ + + + Async<'T> + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + An asynchronous computation, which, when run, will eventually produce a value of type T, or else raises an exception. + + + |
+
+ + + + AsyncBuilder + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The type of the |
+
+ + + + CommonExtensions + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A module of extension members providing asynchronous operations for some basic CLI types related to concurrency and I/O. + + |
+
+ + + + WebExtensions + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A module of extension members providing asynchronous operations for some basic Web operations. + + |
+
+ Type/Module + | ++ Description + | +
+ + | ++ + | +
+ + | ++ + | +
+ + + + Event<'T> + + + + |
+ + + | +
+ + + + Event<'Delegate, 'Args> + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Event implementations for a delegate types following the standard .NET Framework convention of a first 'sender' argument. + + |
+
+ + + + Handler<'T> + + + + |
+ + + | +
+ + | ++ + | +
+ + + + IEvent<'T> + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + First-class listening points (i.e. objects that permit you to register a callback + activated when the event is triggered). + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + First class event values for CLI events conforming to CLI Framework standards. + + |
+
+ + + + Observable + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Contains operations for working with first class event and other observable objects. + + |
+
+ Modules + | ++ Description + | +
+ + + + LazyExtensions + + + + |
+ + + | +
+ Type + | ++ Description + | +
+ + | ++ + | +
+ + + + MailboxProcessor<'Msg> + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A message-processing agent which executes an asynchronous computation. + + |
+
+ Type/Module + | ++ Description + | +
+ + + + AsyncActivation<'T> + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + The F# compiler emits references to this type to implement F# async expressions. + + |
+
+ + + + AsyncPrimitives + + + + |
+ + + | +
+ + + + AsyncReturn + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + The F# compiler emits references to this type to implement F# async expressions. + + |
+
+ Type/Module + | ++ Description + | +
+ + + + BackgroundTaskBuilder + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Contains methods to build tasks using the F# computation expression syntax + + + |
+
+ + + + TaskBuilder (Module) + + + + |
+ + + | +
+ + + + TaskBuilder (Type) + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Contains methods to build tasks using the F# computation expression syntax + + + |
+
+ + + + TaskBuilderBase + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Contains methods to build tasks using the F# computation expression syntax + + + |
+
+ + + + TaskCode<'TOverall, 'T> + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + A special compiler-recognised delegate type for specifying blocks of task code + with access to the state machine. + + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Represents the runtime continuation of a task state machine created dynamically + + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + This is used by the compiler as a template for creating state machine structs + + + |
+
+ + | ++ + | +
+ Adding this attribute to class definition makes it abstract, which means it need not + implement all its methods. Instances of abstract classes may not be constructed directly. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ AbstractClassAttribute()
+ + + + Returns: + AbstractClassAttribute
+
+ AbstractClassAttribute
+ + |
+
+
+
+ + ++
|
+
+ Adding this attribute to a type lets the 'null' literal be used for the type + within F# code. This attribute may only be added to F#-defined class or + interface types. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ AllowNullLiteralAttribute(value)
+ + + Parameters: +
bool
+
+ + + + Returns: + AllowNullLiteralAttribute
+
+ AllowNullLiteralAttribute
+ + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ AllowNullLiteralAttribute()
+ + + + Returns: + AllowNullLiteralAttribute
+
+ AllowNullLiteralAttribute
+ + |
+
+
+
+ + ++
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+ Single dimensional, zero-based arrays, written int[]
, string[]
etc.
+
+ Use the values in the Array module to manipulate values
+ of this type, or the notation arr.[x]
to get/set array
+ values.
+
+ Indicates a construct is automatically opened when brought into scope through + an assembly reference or then opening of the containing namespace or module. +
++ When applied to an assembly, this attribute must be given a string + argument, and this indicates a valid module or namespace in that assembly. Source + code files compiled with a reference to this assembly are processed in an environment + where the given path is automatically opened. + + When applied to a type or module within an assembly, then the attribute must not be given any arguments, and + the type or module is implicitly opened when its enclosing namespace or module is opened. + +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ AutoOpenAttribute(path)
+ + + Parameters: +
string
+ -
+ The namespace or module to be automatically opened when an assembly is referenced
+ or an enclosing module opened.
+
+ + + + Returns: + AutoOpenAttribute
+
+ AutoOpenAttribute
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Creates an attribute used to mark a namespace or module path to be 'automatically opened' when an assembly is referenced + + |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Creates an attribute used to mark a module as 'automatically opened' when the enclosing namespace is opened + + |
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+ Adding this attribute to a type with value 'false' disables the behaviour where F# makes the + type Serializable by default. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ AutoSerializableAttribute(value)
+ + + Parameters: +
bool
+ -
+ Indicates whether the type should be serializable by default.
+
+ + + + Returns: + AutoSerializableAttribute
+
+ AutoSerializableAttribute
+ + |
+
+
+
+ + ++
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+ An abbreviation for the CLI type Boolean. +
+
+ Represents a managed pointer in F# code. For F# 4.5+ this is considered equivalent to byref<'T, ByRefKinds.InOut>
+
+ Represents a managed pointer in F# code. +
++ + Represents a byref that can be read + +
++ + Represents a byref that can be both read and written + +
++ + Represents a byref that can be written + +
++ Represents the types of byrefs in F# 4.5+ +
++ Type + | ++ Description + | +
+ + | ++ + | +
+ + | ++ + | +
+ + | ++ + | +
+ The type of 8-bit unsigned integer numbers, annotated with a unit of measure. + The unit of measure is erased in compiled code and when values of this type + are analyzed using reflection. The type is representationally equivalent to + Byte. +
++ An abbreviation for the CLI type Byte. +
++ An abbreviation for the CLI type Char. +
++ Adding this attribute to a type causes it to be represented using a CLI class. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
|
+
+ Adding this attribute to a property with event type causes it to be compiled with as a CLI + metadata event, through a syntactic translation to a pair of 'add_EventName' and + 'remove_EventName' methods. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
|
+
+ Adding this attribute to a record type causes it to be compiled to a CLI representation + with a default constructor with property getters and setters. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ CLIMutableAttribute()
+ + + + Returns: + CLIMutableAttribute
+
+ CLIMutableAttribute
+ + |
+
+
+
+ + ++
|
+
+ This attribute is used to indicate a generic container type satisfies the F# 'comparison' + constraint only if a generic argument also satisfies this constraint. +
+
+ For example, adding
+ this attribute to parameter 'T on a type definition C<'T> means that a type C
+ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ComparisonConditionalOnAttribute()
+ + + + Returns: + ComparisonConditionalOnAttribute
+
+ ComparisonConditionalOnAttribute
+ + |
+
+
+
+ + ++
|
+
+ This attribute is generated automatically by the F# compiler to tag functions and members + that accept a partial application of some of their arguments and return a residual function. + +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ CompilationArgumentCountsAttribute(counts)
+ + + Parameters: +
int[]
+ -
+ Indicates the number of arguments in each argument group.
+
+ + + + Returns: + CompilationArgumentCountsAttribute
+
+ CompilationArgumentCountsAttribute
+ + |
+
+
+
+ + ++
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
|
+
+ This attribute is inserted automatically by the F# compiler to tag types + and methods in the generated CLI code with flags indicating the correspondence + with original source constructs. +
++ This attribute is used by the functions in the + FSharp.Reflection namespace to reverse-map compiled constructs to + their original forms. It is not intended for use from user code. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ CompilationMappingAttribute(resourceName, typeDefinitions)
+ + + Parameters: +
string
+ -
+ The name of the resource needed to resolve the source construct.
+
+ + + + typeDefinitions + + : + Type[]
+ -
+ Indicates the type definitions needed to resolve the source construct.
+
+ + + + Returns: + CompilationMappingAttribute
+
+ CompilationMappingAttribute
+ + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ CompilationMappingAttribute(sourceConstructFlags, variantNumber, sequenceNumber)
+ + + Parameters: +
SourceConstructFlags
+ -
+ Indicates the type of source construct.
+
+ + + + variantNumber + + : + int
+ -
+ Indicates the index in the sequence of variants.
+
+ + + + sequenceNumber + + : + int
+ -
+ Indicates the index in the sequence of constructs.
+
+ + + + Returns: + CompilationMappingAttribute
+
+ CompilationMappingAttribute
+ + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ CompilationMappingAttribute(sourceConstructFlags, sequenceNumber)
+ + + Parameters: +
SourceConstructFlags
+ -
+ Indicates the type of source construct.
+
+ + + + sequenceNumber + + : + int
+ -
+ Indicates the index in the sequence of constructs.
+
+ + + + Returns: + CompilationMappingAttribute
+
+ CompilationMappingAttribute
+ + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ CompilationMappingAttribute(sourceConstructFlags)
+ + + Parameters: +
SourceConstructFlags
+ -
+ Indicates the type of source construct.
+
+ + + + Returns: + CompilationMappingAttribute
+
+ CompilationMappingAttribute
+ + |
+
+
+
+ + ++
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Indicates the relationship between the compiled entity and F# source code + + |
+
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+ This attribute is used to adjust the runtime representation for a type.
+ For example, it may be used to note that the null
representation
+ may be used for a type. This affects how some constructs are compiled.
+
+
+ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ CompilationRepresentationAttribute(flags)
+ + + Parameters: +
CompilationRepresentationFlags
+ -
+ Indicates adjustments to the compiled representation of the type or member.
+
+ + + + Returns: + CompilationRepresentationAttribute
+
+ CompilationRepresentationAttribute
+ + |
+
+
+
+ + ++
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Indicates one or more adjustments to the compiled representation of an F# type or member + + |
+
+ Indicates one or more adjustments to the compiled representation of an F# type or member. +
++ Record Field + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Event
+ + + + Field type: + CompilationRepresentationFlags
+
+ + Modifiers: + static + + |
+
+
+
+
+
+ + Compile a property as a CLI event. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Instance
+ + + + Field type: + CompilationRepresentationFlags
+
+ + Modifiers: + static + + |
+
+
+
+
+
+
+ Compile a member as 'instance' even if |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ModuleSuffix
+ + + + Field type: + CompilationRepresentationFlags
+
+ + Modifiers: + static + + |
+
+
+
+
+
+ + append 'Module' to the end of a module whose name clashes with a type name in the same namespace. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ None
+ + + + Field type: + CompilationRepresentationFlags
+
+ + Modifiers: + static + + |
+
+
+
+
+
+ + No special compilation representation. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Static
+ + + + Field type: + CompilationRepresentationFlags
+
+ + Modifiers: + static + + |
+
+
+
+
+
+ + Compile an instance member as 'static' . + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ UseNullAsTrueValue
+ + + + Field type: + CompilationRepresentationFlags
+
+ + Modifiers: + static + + |
+
+
+
+
+
+
+ Permit the use of |
+
+ This attribute is inserted automatically by the F# compiler to tag + methods which are given the 'CompiledName' attribute. +
++ This attribute is used by the functions in the + FSharp.Reflection namespace to reverse-map compiled constructs to + their original forms. It is not intended for use from user code. + +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ CompilationSourceNameAttribute(sourceName)
+ + + Parameters: +
string
+ -
+ The name of the method in source.
+
+ + + + Returns: + CompilationSourceNameAttribute
+
+ CompilationSourceNameAttribute
+ + |
+
+
+
+ + ++
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+ Adding this attribute to a value or function definition in an F# module changes the name used + for the value in compiled CLI code. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ CompiledNameAttribute(compiledName)
+ + + Parameters: +
string
+ -
+ The name to use in compiled code.
+
+ + + + Returns: + CompiledNameAttribute
+
+ CompiledNameAttribute
+ + |
+
+
+
+ + ++
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+ Indicates that a message should be emitted when F# source code uses this construct. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ CompilerMessageAttribute(message, messageNumber)
+ + + Parameters: + + + + Returns: + CompilerMessageAttribute
+
+ + |
+
+
+
+ + ++ +
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.IsError
+ + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Indicates if the message should indicate a compiler error. Error numbers less than + 10000 are considered reserved for use by the F# compiler and libraries. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.IsHidden
+ + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Indicates if the construct should always be hidden in an editing environment. + + |
+
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+ + Defines the implementation of the code run after the creation of a struct state machine. + +
++ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Invoke
+ + + Parameters: +
byref<ResumableStateMachine<'Data>>
+
+ + + + Returns: + 'Result
+
+ + Modifiers: + abstract + + |
+
+
|
+
+ + Collects elements and builds an array + +
++ Record Field + | ++ Description + | +
+ + | +
+
|
+
+ + | +
+
|
+
+
+
+
+
+
+
+
+ |
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Second
+ + + + Field type: + 'T
+
+ + Modifiers: + mutable + + |
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Add
+ + + Parameters: +
'T
+
+ + + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.AddManyAndClose
+ + + Parameters: +
'T seq
+
+ + + + Returns: + 'T[]
+
+ + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Close
+ + + + Returns: + 'T[]
+
+ + |
+
+
+
+ + ++
|
+
+ The F# compiler emits implementations of this type for compiled sequence expressions. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ GeneratedSequenceBase()
+ + + + Returns: + GeneratedSequenceBase<'T>
+
+ A new sequence generator for the expression.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + The F# compiler emits implementations of this type for compiled sequence expressions. + + |
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Close
+ + + Modifiers: + abstract + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + The F# compiler emits implementations of this type for compiled sequence expressions. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GenerateNext
+ + + Parameters: +
byref<IEnumerable<'T>>
+ -
+ A reference to the sequence.
+
+ + + + Returns: + int
+
+ A 0, 1, and 2 respectively indicate Stop, Yield, and Goto conditions for the sequence generator.
+ + Modifiers: + abstract + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + The F# compiler emits implementations of this type for compiled sequence expressions. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetFreshEnumerator
+ + + + Returns: + IEnumerator<'T>
+
+ A new enumerator for the sequence.
+ + Modifiers: + abstract + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + The F# compiler emits implementations of this type for compiled sequence expressions. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.LastGenerated
+ + + + Returns: + 'T
+
+ + Modifiers: + abstract + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + The F# compiler emits implementations of this type for compiled sequence expressions. + + |
+
+ + Represents a namespace provided by a type provider component. + +
++ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetNestedNamespaces
+ + + + Returns: + IProvidedNamespace[]
+
+ + Modifiers: + abstract + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + The sub-namespaces in this namespace. An optional member to prevent generation of namespaces until an outer namespace is explored. + + + |
+
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+ +
++ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Data
+ + + Modifiers: + abstract + + |
+ + + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+ + Represents an instantiation of a type provider component. + +
++ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.ApplyStaticArguments
+ + + Parameters: +
Type
+ -
+ the provided type definition which has static parameters
+
+ + + + typePathWithArguments + + : + string[]
+ -
+ the full path of the type, including encoded representations of static parameters
+
+ + + + staticArguments + + : + obj[]
+ -
+ the static parameters, indexed by name
+
+ + + + Returns: + Type
+
+
+ + Modifiers: + abstract + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Apply static arguments to a provided type that accepts static arguments. + + + |
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetInvokerExpression
+ + + Parameters: +
MethodBase
+ -
+ MethodBase that was given to the compiler by a type returned by a GetType(s) call.
+
+ + + + parameters + + : + Expr[]
+ -
+ Expressions that represent the parameters to this call.
+
+ + + + Returns: + Expr
+
+ An expression that the compiler will use in place of the given method base.
+ + Modifiers: + abstract + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Called by the compiler to ask for an Expression tree to replace the given MethodBase with. + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetNamespaces
+ + + + Returns: + IProvidedNamespace[]
+
+ + Modifiers: + abstract + + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetStaticParameters
+ + + Parameters: +
Type
+ -
+ A type returned by GetTypes or ResolveTypeName
+
+ + + + Returns: + ParameterInfo[]
+
+
+ + Modifiers: + abstract + + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Invalidate
+ + + + Returns: + IEvent<EventHandler, EventArgs>
+
+ + Modifiers: + abstract + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Triggered when an assumption changes that invalidates the resolutions so far reported by the provider + + + |
+
+ + Represents additional, optional information for a type provider component + +
++ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.ApplyStaticArgumentsForMethod
+ + + Parameters: +
MethodBase
+ -
+ the provided method definition which has static parameters
+
+ + + + methodNameWithArguments + + : + string
+ -
+ the full name of the method that must be returned, including encoded representations of static parameters
+
+ + + + staticArguments + + : + obj[]
+ -
+ the values of the static parameters, indexed by name
+
+ + + + Returns: + MethodBase
+
+ The provided method definition corresponding to the given static parameter values
+ + Modifiers: + abstract + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Apply static arguments to a provided method that accepts static arguments. + + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetStaticParametersForMethod
+ + + Parameters: +
MethodBase
+ -
+ A method returned by GetMethod on a provided type
+
+ + + + Returns: + ParameterInfo[]
+
+ The static parameters of the provided method, if any
+ + Modifiers: + abstract + + |
+
+
+
+ + ++
|
+
+ + Collects elements and builds a list + +
++ Record Field + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Add
+ + + Parameters: +
'T
+
+ + + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+ Represents the inverse of a measure expressions when returned as a generic argument of a provided type. +
++ Represents the '1' measure expression when returned as a generic argument of a provided type. +
++ Represents the product of two measure expressions when returned as a generic argument of a provided type. +
++ + Defines the implementation of the MoveNext method for a struct state machine. + +
++ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Invoke
+ + + Parameters: +
byref<ResumableStateMachine<'Data>>
+
+ + + Modifiers: + abstract + + |
+
+
|
+
+ Adding this attribute to the method adjusts the processing of some generic methods + during overload resolution. +
+
+ During overload resolution, caller arguments are matched with called arguments
+ to extract type information. By default, when the caller argument type is unconstrained (for example
+ a simple value x
without known type information), and a method qualifies for
+ lambda constraint propagation, then member trait constraints from a method overload
+ are eagerly applied to the caller argument type. This causes that overload to be preferred,
+ regardless of other method overload resolution rules. Using this attribute suppresses this behaviour.
+
+
+ + Consider the following overloads: +
type OverloadsWithSrtp() =
+ [<NoEagerConstraintApplicationAttribute>]
+ static member inline SomeMethod< ^T when ^T : (member Number: int) > (x: ^T, f: ^T -> int) = 1
+ static member SomeMethod(x: 'T list, f: 'T list -> int) = 2
+
+ let inline f x =
+ OverloadsWithSrtp.SomeMethod (x, (fun a -> 1))
+
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ NoEagerConstraintApplicationAttribute()
+ + + + Returns: + NoEagerConstraintApplicationAttribute
+
+ NoEagerConstraintApplicationAttribute
+ + |
+
+
+
+ + ++
|
+
+ + A special compiler-recognised delegate type for specifying blocks of resumable code + with access to the state machine. + +
++ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Invoke
+ + + Parameters: +
byref<ResumableStateMachine<'Data>>
+
+ + + + Returns: + bool
+
+ + Modifiers: + abstract + + |
+
+
|
+
+ + Contains functions for composing resumable code blocks + +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ResumableCode.Combine (code1, code2)
+ + + Parameters: +
ResumableCode<'Data, unit>
+
+ + + + code2 + + : + ResumableCode<'Data, 'T>
+
+ + + + Returns: + ResumableCode<'Data, 'T>
+
+ + Modifiers: + inline + + Type parameters: + 'Data, 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ResumableCode.CombineDynamic (sm, code1, code2)
+ + + Parameters: +
byref<ResumableStateMachine<'Data>>
+
+ + + + code1 + + : + ResumableCode<'Data, unit>
+
+ + + + code2 + + : + ResumableCode<'Data, 'T>
+
+ + + + Returns: + bool
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + The dynamic implementation of the corresponding operation. This operation should not be used directly. + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ResumableCode.Delay f
+ + + Parameters: +
unit -> ResumableCode<'Data, 'T>
+
+ + + + Returns: + ResumableCode<'Data, 'T>
+
+ + Modifiers: + inline + + Type parameters: + 'Data, 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ResumableCode.For (sequence, body)
+ + + Parameters: +
'T seq
+
+ + + + body + + : + 'T -> ResumableCode<'Data, unit>
+
+ + + + Returns: + ResumableCode<'Data, unit>
+
+ + Modifiers: + inline + + Type parameters: + 'T, 'Data + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ResumableCode.TryFinally (body, compensation)
+ + + Parameters: +
ResumableCode<'Data, 'T>
+
+ + + + compensation + + : + ResumableCode<'Data, unit>
+
+ + + + Returns: + ResumableCode<'Data, 'T>
+
+ + Modifiers: + inline + + Type parameters: + 'Data, 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Specifies resumable code which executes with try/finally semantics + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ResumableCode.TryFinallyAsync (body, compensation)
+ + + Parameters: +
ResumableCode<'Data, 'T>
+
+ + + + compensation + + : + ResumableCode<'Data, unit>
+
+ + + + Returns: + ResumableCode<'Data, 'T>
+
+ + Modifiers: + inline + + Type parameters: + 'Data, 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Specifies resumable code which executes with try/finally semantics + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ResumableCode.TryFinallyAsyncDynamic (sm, body, compensation)
+ + + Parameters: +
byref<ResumableStateMachine<'Data>>
+
+ + + + body + + : + ResumableCode<'Data, 'T>
+
+ + + + compensation + + : + ResumableCode<'Data, unit>
+
+ + + + Returns: + bool
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + The dynamic implementation of the corresponding operation. This operation should not be used directly. + + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ResumableCode.TryWith (body, catch)
+ + + Parameters: +
ResumableCode<'Data, 'T>
+
+ + + + catch + + : + exn -> ResumableCode<'Data, 'T>
+
+ + + + Returns: + ResumableCode<'Data, 'T>
+
+ + Modifiers: + inline + + Type parameters: + 'Data, 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ResumableCode.TryWithDynamic (sm, body, handler)
+ + + Parameters: +
byref<ResumableStateMachine<'Data>>
+
+ + + + body + + : + ResumableCode<'Data, 'T>
+
+ + + + handler + + : + exn -> ResumableCode<'Data, 'T>
+
+ + + + Returns: + bool
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + The dynamic implementation of the corresponding operation. This operation should not be used directly. + + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ResumableCode.Using (resource, body)
+ + + Parameters: +
'Resource
+
+ + + + body + + : + 'Resource -> ResumableCode<'Data, 'T>
+
+ + + + Returns: + ResumableCode<'Data, 'T>
+
+ + Modifiers: + inline + + Type parameters: + 'Resource, 'Data, 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ResumableCode.While (condition, body)
+ + + Parameters: +
unit -> bool
+
+ + + + body + + : + ResumableCode<'Data, unit>
+
+ + + + Returns: + ResumableCode<'Data, unit>
+
+ + Modifiers: + inline + + Type parameters: + 'Data + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ResumableCode.WhileDynamic (sm, condition, body)
+ + + Parameters: +
byref<ResumableStateMachine<'Data>>
+
+ + + + condition + + : + unit -> bool
+
+ + + + body + + : + ResumableCode<'Data, unit>
+
+ + + + Returns: + bool
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + The dynamic implementation of the corresponding operation. This operation should not be used directly. + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ResumableCode.Yield ()
+ + + Parameters: +
unit
+
+ + + + Returns: + ResumableCode<'Data, unit>
+
+ + Modifiers: + inline + + Type parameters: + 'Data + |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ResumableCode.YieldDynamic sm
+ + + Parameters: +
byref<ResumableStateMachine<'Data>>
+
+ + + + Returns: + bool
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + The dynamic implementation of the corresponding operation. This operation should not be used directly. + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ResumableCode.Zero ()
+ + + Parameters: +
unit
+
+ + + + Returns: + ResumableCode<'Data, unit>
+
+ + Modifiers: + inline + + Type parameters: + 'Data + |
+ + + | +
+ + Acts as a template for struct state machines introduced by __stateMachine, and also as a reflective implementation + +
++ Record Field + | ++ Description + | +
+ + | +
+
+
+
+
+ + + When statically compiled, holds the data for the state machine + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ResumptionDynamicInfo
+ + + + Field type: + ResumptionDynamicInfo<'Data>
+
+ + Modifiers: + mutable + + |
+
+
+
+
+
+ + Represents the delegated runtime continuation for a resumable state machine created dynamically + + |
+
+
+
+
+
+
+
+
+ |
+ + + | +
+ + Represents the delegated runtime continuation of a resumable state machine created dynamically + +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ResumptionDynamicInfo(initial)
+ + + Parameters: +
ResumptionFunc<'Data>
+
+ + + + Returns: + ResumptionDynamicInfo<'Data>
+
+ + |
+
+
+
+ + ++
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.MoveNext
+ + + Parameters: +
byref<ResumableStateMachine<'Data>>
+
+ + + Modifiers: + abstract + + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.ResumptionData
+ + + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.ResumptionFunc
+ + + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.SetStateMachine
+ + + Parameters: +
byref<ResumableStateMachine<'Data>>
+
+ + + + machineState + + : + IAsyncStateMachine
+
+ + + Modifiers: + abstract + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Executes the SetStateMachine implementation of the state machine + + + |
+
+ + Represents the runtime continuation of a resumable state machine created dynamically + +
++ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Invoke
+ + + Parameters: +
byref<ResumableStateMachine<'Data>>
+
+ + + + Returns: + bool
+
+ + Modifiers: + abstract + + |
+
+
|
+
+ A group of functions used as part of the compiled representation of F# sequence expressions. +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ RuntimeHelpers.CreateEvent addHandler removeHandler createHandler
+ + + Parameters: +
'Delegate -> unit
+ -
+ A function to handle adding a delegate for the event to trigger.
+
+ + + + removeHandler + + : + 'Delegate -> unit
+ -
+ A function to handle removing a delegate that the event triggers.
+
+ + + + createHandler + + : + (obj -> 'Args -> unit) -> 'Delegate
+ -
+ A function to produce the delegate type the event can trigger.
+
+ + + + Returns: + IEvent<'Delegate, 'Args>
+
+ The initialized event.
+ + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ RuntimeHelpers.EnumerateFromFunctions create moveNext current
+ + + Parameters: +
unit -> 'T
+ -
+ An initializer function.
+
+ + + + moveNext + + : + 'T -> bool
+ -
+ A function to iterate and test if end of sequence is reached.
+
+ + + + current + + : + 'T -> 'U
+ -
+ A function to retrieve the current element.
+
+ + + + Returns: + 'U seq
+
+ The resulting typed sequence.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + The F# compiler emits calls to this function to implement the compiler-intrinsic + conversions from untyped IEnumerable sequences to typed sequences. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ RuntimeHelpers.EnumerateThenFinally source compensation
+ + + Parameters: +
'T seq
+ -
+ The input sequence.
+
+ + + + compensation + + : + unit -> unit
+ -
+ A computation to be included in an enumerator's Dispose method.
+
+ + + + Returns: + 'T seq
+
+ The result sequence.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The F# compiler emits calls to this function to
+ implement the |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ RuntimeHelpers.EnumerateTryWith source exceptionFilter exceptionHandler
+ + + Parameters: +
'T seq
+ -
+ The input sequence.
+
+ + + + exceptionFilter + + : + exn -> int
+ -
+ Pattern matches after 'when' converted to return 1
+
+ + + + exceptionHandler + + : + exn -> 'T seq
+ -
+ Pattern matches after 'when' with their actual execution code
+
+ + + + Returns: + 'T seq
+
+ The result sequence.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The F# compiler emits calls to this function to
+ implement the |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ RuntimeHelpers.EnumerateUsing resource source
+ + + Parameters: +
'T
+ -
+ The resource to be used and disposed.
+
+ + + + source + + : + 'T -> 'Collection
+ -
+ The input sequence.
+
+ + + + Returns: + 'U seq
+
+ The result sequence.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The F# compiler emits calls to this function to implement the |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The F# compiler emits calls to this function to
+ implement the |
+
+ + Defines the implementation of the SetStateMachine method for a struct state machine. + +
++ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Invoke
+ + + Parameters: +
byref<ResumableStateMachine<'Data>>
+
+ + + + arg1 + + : + IAsyncStateMachine
+
+ + + Modifiers: + abstract + + |
+
+
|
+
+ + Contains compiler intrinsics related to the definition of state machines. + +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Indicates a named debug point arising from the context of inlined code. + + + |
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ __resumeAt programLabel
+ + + Parameters: +
int
+ -
+
+
+ + + + Returns: + 'T
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Indicates to jump to a resumption point within resumable code. + This may be the first statement in a MoveNextMethodImpl. + The integer must be a valid resumption point within this resumable code. + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ __stateMachine moveNextMethod setStateMachineMethod afterCode
+ + + Parameters: +
MoveNextMethodImpl<'Data>
+ -
+ Gives the implementation of the MoveNext method on IAsyncStateMachine.
+
+ + + + setStateMachineMethod + + : + SetStateMachineMethodImpl<'Data>
+ -
+ Gives the implementation of the SetStateMachine method on IAsyncStateMachine.
+
+ + + + afterCode + + : + AfterCode<'Data, 'Result>
+ -
+ Gives code to execute after the generation of the state machine and to produce the final result.
+
+ + + + Returns: + 'Result
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Statically generates a closure struct type based on ResumableStateMachine, + At runtime an instance of the new struct type is populated and 'afterMethod' is called + to consume it. + + + |
+
+
+
+
+
+
+
+
+ |
+ + + | +
+ Place this attribute on a runtime assembly to indicate that there is a corresponding design-time + assembly that contains a type provider. Runtime and design-time assembly may be the same. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ TypeProviderAssemblyAttribute(assemblyName)
+ + + Parameters: +
string
+ -
+ The name of the design-time assembly for this type provider.
+
+ + + + Returns: + TypeProviderAssemblyAttribute
+
+ TypeProviderAssemblyAttribute
+ + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ TypeProviderAssemblyAttribute()
+ + + + Returns: + TypeProviderAssemblyAttribute
+
+ TypeProviderAssemblyAttribute
+ + |
+
+
+
+ + ++
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+ Place on a class that implements ITypeProvider to extend the compiler +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ TypeProviderAttribute()
+ + + + Returns: + TypeProviderAttribute
+
+ TypeProviderAttribute
+ + |
+
+
+
+ + ++
|
+
+ + If the class that implements ITypeProvider has a constructor that accepts TypeProviderConfig + then it will be constructed with an instance of TypeProviderConfig. + +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ TypeProviderConfig(systemRuntimeContainsType, getReferencedAssemblies)
+ + + Parameters: +
string -> bool
+
+ + + + getReferencedAssemblies + + : + unit -> string[]
+
+ + + + Returns: + TypeProviderConfig
+
+ + |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ TypeProviderConfig(systemRuntimeContainsType)
+ + + Parameters: + + + + Returns: + TypeProviderConfig
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Create a configuration which calls the given function for the corresponding operation. + + + |
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.IsHostedExecution
+ + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Indicates if the type provider instance is used in an environment which executes provided code such as F# Interactive. + + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.IsInvalidationSupported
+ + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Indicates if the type provider host responds to invalidation events for type provider instances. + + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.ReferencedAssemblies
+ + + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.ResolutionFolder
+ + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Get the full path to use to resolve relative paths in any file name arguments given to the type provider instance. + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.RuntimeAssembly
+ + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Get the full path to referenced assembly that caused this type provider instance to be created. + + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.SystemRuntimeAssemblyVersion
+ + + |
+ + + | +
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.TemporaryFolder
+ + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Get the full path to use for temporary files for the type provider instance. + + + |
+
+ A type provider may provide an instance of this attribute to indicate the definition location for a provided type or member. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ TypeProviderDefinitionLocationAttribute()
+ + + + Returns: + TypeProviderDefinitionLocationAttribute
+
+ + |
+
+
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Column
+ + + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.FilePath
+ + + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Line
+ + + |
+ + + | +
+ Indicates that a code editor should hide all System.Object methods from the intellisense menus for instances of a provided type +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ TypeProviderEditorHideMethodsAttribute()
+ + + + Returns: + TypeProviderEditorHideMethodsAttribute
+
+ TypeProviderEditorHideMethodsAttribute
+ + |
+
+
+
+ + ++
|
+
+ Additional type attribute flags related to provided types +
++ Record Field + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ IsErased
+ + + + Field type: + TypeProviderTypeAttributes
+
+ + Modifiers: + static + + |
+
+
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ SuppressRelocate
+ + + + Field type: + TypeProviderTypeAttributes
+
+ + Modifiers: + static + + |
+
+
|
+
+ A type provider may provide an instance of this attribute to indicate the documentation to show for + a provided type or member. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ TypeProviderXmlDocAttribute(commentText)
+ + + Parameters: +
string
+
+ + + + Returns: + TypeProviderXmlDocAttribute
+
+ TypeProviderXmlDocAttribute
+ + |
+
+
+
+ + ++
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+ + Library functionality for supporting type providers and code generated by the F# compiler. See + also F# Type Providers in the F# Language Guide. + +
++ Type/Module + | ++ Description + | +
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Defines the implementation of the code run after the creation of a struct state machine. + + + |
+
+ + + + ArrayCollector<'T> + + + + |
+ + + | +
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + The F# compiler emits implementations of this type for compiled sequence expressions. + + |
+
+ + + + IProvidedNamespace + + + + |
+ + + | +
+ + | ++ + | +
+ + + + ITypeProvider + + + + |
+ + + | +
+ + + + ITypeProvider2 + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Represents additional, optional information for a type provider component + + + |
+
+ + + + ListCollector<'T> + + + + |
+ + + | +
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Represents the inverse of a measure expressions when returned as a generic argument of a provided type. + + |
+
+ + + + MeasureOne + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Represents the '1' measure expression when returned as a generic argument of a provided type. + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Represents the product of two measure expressions when returned as a generic argument of a provided type. + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Defines the implementation of the MoveNext method for a struct state machine. + + + |
+
+ + + + ResumableCode + + + + |
+ + + | +
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + A special compiler-recognised delegate type for specifying blocks of resumable code + with access to the state machine. + + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Acts as a template for struct state machines introduced by __stateMachine, and also as a reflective implementation + + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Represents the delegated runtime continuation of a resumable state machine created dynamically + + + |
+
+ + + + ResumptionFunc<'Data> + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Represents the runtime continuation of a resumable state machine created dynamically + + + |
+
+ + + + RuntimeHelpers + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A group of functions used as part of the compiled representation of F# sequence expressions. + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Defines the implementation of the SetStateMachine method for a struct state machine. + + + |
+
+ + + + StateMachineHelpers + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Contains compiler intrinsics related to the definition of state machines. + + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Place this attribute on a runtime assembly to indicate that there is a corresponding design-time + assembly that contains a type provider. Runtime and design-time assembly may be the same. + + |
+
+ + + + TypeProviderAttribute + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Place on a class that implements ITypeProvider to extend the compiler + + |
+
+ + + + TypeProviderConfig + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + If the class that implements ITypeProvider has a constructor that accepts TypeProviderConfig + then it will be constructed with an instance of TypeProviderConfig. + + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A type provider may provide an instance of this attribute to indicate the definition location for a provided type or member. + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Indicates that a code editor should hide all System.Object methods from the intellisense menus for instances of a provided type + + |
+
+ + | ++ + | +
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A type provider may provide an instance of this attribute to indicate the documentation to show for + a provided type or member. + + |
+
+ Type + | ++ Description + | +
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Adding this attribute to the method adjusts the processing of some generic methods + during overload resolution. + + |
+
+ Adding this attribute to a type indicates it is a type with a user-defined implementation of comparison. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ CustomComparisonAttribute()
+ + + + Returns: + CustomComparisonAttribute
+
+ CustomComparisonAttribute
+ + |
+
+
+
+ + ++
|
+
+ Adding this attribute to a type indicates it is a type with a user-defined implementation of equality. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ CustomEqualityAttribute()
+ + + + Returns: + CustomEqualityAttribute
+
+ CustomEqualityAttribute
+ + |
+
+
+
+ + ++
|
+
+ Indicates that a member on a computation builder type is a custom query operator, + and indicates the name of that operator. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ CustomOperationAttribute(name)
+ + + Parameters: +
string
+
+ + + + Returns: + CustomOperationAttribute
+
+ CustomOperationAttribute
+ + |
+
+
+
+ + ++
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.AllowIntoPattern
+ + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Indicates if the custom operation supports the use of 'into' immediately after the use of the operation in a query or other computation expression to consume the results of the operation + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.IsLikeGroupJoin
+ + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Indicates if the custom operation is an operation similar to a group join in a sequence computation, supporting two inputs and a correlation constraint, and generating a group + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.IsLikeJoin
+ + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Indicates if the custom operation is an operation similar to a join in a sequence computation, supporting two inputs and a correlation constraint + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.IsLikeZip
+ + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Indicates if the custom operation is an operation similar to a zip in a sequence computation, supporting two inputs + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.JoinConditionWord
+ + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Indicates the name used for the 'on' part of the custom query operator for join-like operators + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.MaintainsVariableSpace
+ + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Indicates if the custom operation maintains the variable space of the query of computation expression + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.MaintainsVariableSpaceUsingBind
+ + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Indicates if the custom operation maintains the variable space of the query of computation expression through the use of a bind operation + + |
+
+
+
+
+
+
+
+
+ |
+ + + | +
+ The type of decimal numbers, annotated with a unit of measure. The unit + of measure is erased in compiled code and when values of this type + are analyzed using reflection. The type is representationally equivalent to + Decimal. +
++ Adding this attribute to a discriminated union with value false + turns off the generation of standard helper member tester, constructor + and accessor members for the generated CLI class for that type. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ DefaultAugmentationAttribute(value)
+ + + Parameters: +
bool
+ -
+ Indicates whether to generate helper members on the CLI class representing a discriminated
+ union.
+
+ + + + Returns: + DefaultAugmentationAttribute
+
+ DefaultAugmentationAttribute
+ + |
+
+
+
+ + ++
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+ Adding this attribute to a field declaration means that the field is + not initialized. During type checking a constraint is asserted that the field type supports 'null'. + If the 'check' value is false then the constraint is not asserted. + +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ DefaultValueAttribute(check)
+ + + Parameters: +
bool
+ -
+ Indicates whether to assert that the field type supports null .
+
+ + + + Returns: + DefaultValueAttribute
+
+ DefaultValueAttribute
+ + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ DefaultValueAttribute()
+ + + + Returns: + DefaultValueAttribute
+
+ DefaultValueAttribute
+ + |
+
+
+
+ + ++
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+ The type of double-precision floating point numbers, annotated with a unit of measure. + The unit of measure is erased in compiled code and when values of this type + are analyzed using reflection. The type is representationally equivalent to + Double. +
++ Adding this attribute to a function indicates it is the entrypoint for an application. + If this attribute is not specified for an EXE then the initialization implicit in the + module bindings in the last file in the compilation sequence are used as the entrypoint. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ EntryPointAttribute()
+ + + + Returns: + EntryPointAttribute
+
+ EntryPointAttribute
+ + |
+
+
+
+ + ++
|
+
+ This attribute is used to indicate a generic container type satisfies the F# 'equality' + constraint only if a generic argument also satisfies this constraint. +
+
+ For example, adding
+ this attribute to parameter 'T on a type definition C<'T> means that a type C
+ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ EqualityConditionalOnAttribute()
+ + + + Returns: + EqualityConditionalOnAttribute
+
+ EqualityConditionalOnAttribute
+ + |
+
+
+
+ + ++
|
+
+ This attribute is used to tag values that are part of an experimental library + feature. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ExperimentalAttribute(message)
+ + + Parameters: +
string
+ -
+ The warning message to be emitted when code uses this construct.
+
+ + + + Returns: + ExperimentalAttribute
+
+ ExperimentalAttribute
+ + |
+
+
+
+ + ++
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+ +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ int8 value
+ + + Parameters: +
^T
+
+ + + + Returns: + sbyte
+
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+ + ++
+ This is a direct, checked conversion for all
+ primitive numeric types. For strings, the input is converted using
+ Example +++
+Multiple items
+module Checked + +from Microsoft.FSharp.Core.Operators -------------------- module Checked + +from Microsoft.FSharp.Core.ExtraTopLevelOperators val int8: value: 'T -> sbyte (requires member op_Explicit)
+
+
+ Evaluates to -12y .
+
+
+ + Example +++
+Multiple items
+module Checked + +from Microsoft.FSharp.Core.Operators -------------------- module Checked + +from Microsoft.FSharp.Core.ExtraTopLevelOperators val int8: value: 'T -> sbyte (requires member op_Explicit)
+
+
+ Throws System.OverflowException .
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ uint8 value
+ + + Parameters: +
^T
+
+ + + + Returns: + byte
+
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+ + ++
+ This is a direct, checked conversion for all
+ primitive numeric types. For strings, the input is converted using
+ Example +++
+Multiple items
+module Checked + +from Microsoft.FSharp.Core.Operators -------------------- module Checked + +from Microsoft.FSharp.Core.ExtraTopLevelOperators val uint8: value: 'T -> byte (requires member op_Explicit)
+
+
+ Evaluates to -12y .
+
+
+ + Example +++
+Multiple items
+module Checked + +from Microsoft.FSharp.Core.Operators -------------------- module Checked + +from Microsoft.FSharp.Core.ExtraTopLevelOperators val uint8: value: 'T -> byte (requires member op_Explicit)
+
+
+ Throws System.OverflowException .
+
+
+ |
+
+ A set of extra operators and functions. This module is automatically opened in all F# code. +
++ Modules + | ++ Description + | +
+ + + + Checked + + + + |
+ + + | +
+ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ (~%%) expression
+ + + Parameters: +
Expr
+
+ + + + Returns: + 'T
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Special prefix operator for splicing untyped expressions into quotation holes. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ (~%) expression
+ + + Parameters: +
Expr<'T>
+
+ + + + Returns: + 'T
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Special prefix operator for splicing typed expressions into quotation holes. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ array2D rows
+ + + Parameters: +
'a seq
+
+ + + + Returns: + 'T[,]
+
+ + |
+
+
+
+ + ++
+ Example +++
+val array2D: rows: #('T seq) seq -> 'T array2d
+
+
+ Evaluates to a 2x2 zero-based array with contents [[1.0; 2.0]; [3.0; 4.0]]
+
+ |
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Builds an asynchronous workflow using computation expression syntax. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ dict keyValuePairs
+ + + Parameters: +
('Key * 'Value) seq
+
+ + + + Returns: + IDictionary<'Key, 'Value>
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Builds a read-only lookup table from a sequence of key/value pairs. The key objects are indexed using generic hashing and equality. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ double value
+ + + Parameters: +
^T
+
+ + + + Returns: + double
+
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+ + ++
+ This is a direct conversion for all
+ primitive numeric types. For strings, the input is converted using
+ Example +++
+Multiple items
+
+
+ Evaluates to val double: value: 'T -> double (requires member op_Explicit) -------------------- type double = System.Double -------------------- type double<'Measure> = float<'Measure> 45.0 .
+
+
+ + Example +++
+Multiple items
+
+
+ Evaluates to val double: value: 'T -> double (requires member op_Explicit) -------------------- type double = System.Double -------------------- type double<'Measure> = float<'Measure> 12.30000019 .
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ eprintf format
+ + + Parameters: +
TextWriterFormat<'T>
+ -
+ The formatter.
+
+ + + + Returns: + 'T
+
+ The formatted result.
+ + |
+
+
+
+ + ++
+ Example ++
+ See |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ eprintfn format
+ + + Parameters: +
TextWriterFormat<'T>
+ -
+ The formatter.
+
+ + + + Returns: + 'T
+
+ The formatted result.
+ + |
+
+
+
+ + ++
+ Example ++
+ See |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ failwithf format
+ + + Parameters: +
StringFormat<'T, 'Result>
+ -
+ The formatter.
+
+ + + + Returns: + 'T
+
+ The formatted result.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Print to a string buffer and raise an exception with the given + result. Helper printers must return strings. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ fprintf textWriter format
+ + + Parameters: +
TextWriter
+ -
+ The file TextWriter.
+
+ + + + format + + : + TextWriterFormat<'T>
+ -
+ The formatter.
+
+ + + + Returns: + 'T
+
+ The formatted result.
+ + |
+
+
+
+ + ++
+ Example ++
+ See |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ fprintfn textWriter format
+ + + Parameters: +
TextWriter
+ -
+ The file TextWriter.
+
+ + + + format + + : + TextWriterFormat<'T>
+ -
+ The formatter.
+
+ + + + Returns: + 'T
+
+ The formatted result.
+ + |
+
+
+
+ + ++
+ Example ++
+ See |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ int8 value
+ + + Parameters: +
^T
+
+ + + + Returns: + int8
+
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+ + ++
+ This is a direct conversion for all
+ primitive numeric types. For strings, the input is converted using
+ Example +++
+Multiple items
+
+
+ Evaluates to val int8: value: 'T -> int8 (requires member op_Explicit) -------------------- type int8 = System.SByte -------------------- type int8<'Measure> = sbyte<'Measure> -12y .
+
+
+ + Example +++
+Multiple items
+
+
+ Evaluates to val int8: value: 'T -> int8 (requires member op_Explicit) -------------------- type int8 = System.SByte -------------------- type int8<'Measure> = sbyte<'Measure> 3y .
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ printf format
+ + + Parameters: +
TextWriterFormat<'T>
+ -
+ The formatter.
+
+ + + + Returns: + 'T
+
+ The formatted result.
+ + |
+
+
+
+ + ++
+ Example ++
+ See |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ printfn format
+ + + Parameters: +
TextWriterFormat<'T>
+ -
+ The formatter.
+
+ + + + Returns: + 'T
+
+ The formatted result.
+ + |
+
+
+
+ + ++
+ Example ++
+ See |
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+val findEvensAndSortAndDouble: xs: System.Linq.IQueryable<int> -> System.Linq.IQueryable<int>
+val xs: System.Linq.IQueryable<int>
+namespace System
+namespace System.Linq
+Multiple items
+type IQueryable = + inherit IEnumerable + member ElementType: Type + member Expression: Expression + member Provider: IQueryProvider <summary>Provides functionality to evaluate queries against a specific data source wherein the type of the data is not specified.</summary> -------------------- type IQueryable<'T> = + inherit IEnumerable<'T> + inherit IEnumerable + inherit IQueryable <summary>Provides functionality to evaluate queries against a specific data source wherein the type of the data is known.</summary> <typeparam name="T">The type of the data in the data source.</typeparam> Multiple items
+val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = + int val query: Linq.QueryBuilder
+val x: int
+custom operation: where (bool)
+
+Calls Linq.QueryBuilder.Where
+custom operation: sortBy ('Key)
+
+Calls Linq.QueryBuilder.SortBy
+custom operation: select ('Result)
+
+Calls Linq.QueryBuilder.Select
+val data: int list
+module Seq
+
+from Microsoft.FSharp.Collections
+val toList: source: 'T seq -> 'T list
+
+
+ Evaluates to [4; 4; 12; 12] .
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ readOnlyDict keyValuePairs
+ + + Parameters: +
('Key * 'Value) seq
+
+ + + + Returns: + IReadOnlyDictionary<'Key, 'Value>
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Builds a read-only lookup table from a sequence of key/value pairs. The key objects are indexed using generic hashing and equality. + + |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Builds a set from a sequence of objects. The objects are indexed using generic comparison. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ single value
+ + + Parameters: +
^T
+
+ + + + Returns: + single
+
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+ + ++
+ This is a direct conversion for all
+ primitive numeric types. For strings, the input is converted using
+ Example +++
+Multiple items
+
+
+ Evaluates to val single: value: 'T -> single (requires member op_Explicit) -------------------- type single = System.Single -------------------- type single<'Measure> = float32<'Measure> 45.0f .
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ sprintf format
+ + + Parameters: +
StringFormat<'T>
+ -
+ The formatter.
+
+ + + + Returns: + 'T
+
+ The formatted result.
+ + |
+
+
+
+ + ++
+ Example ++
+ See |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ uint8 value
+ + + Parameters: +
^T
+
+ + + + Returns: + uint8
+
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+ + ++
+ This is a direct conversion for all
+ primitive numeric types. For strings, the input is converted using
+ Example +++
+Multiple items
+
+
+ Evaluates to val uint8: value: 'T -> uint8 (requires member op_Explicit) -------------------- type uint8 = System.Byte -------------------- type uint8<'Measure> = byte<'Measure> 12uy .
+
+
+ |
+
+ Active pattern + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ (|Lazy|) input
+ + + Parameters: +
Lazy<'T>
+
+ + + + Returns: + 'T
+
+ + |
+
+
+
+ + ++
+ Example +++
+val f: Lazy<int> -> int
+Multiple items
+active recognizer Lazy: Lazy<'T> -> 'T -------------------- type Lazy<'T> = System.Lazy<'T> val v: int
+val v: Lazy<int>
+val printf: format: Printf.TextWriterFormat<'T> -> 'T
+
+
+ Evaluates to 10 . The text eval! is printed once on the first invocation of f .
+
+
+ |
+
+ The type of double-precision floating point numbers, annotated with a unit of measure. + The unit of measure is erased in compiled code and when values of this type + are analyzed using reflection. The type is representationally equivalent to + Double. +
++ An abbreviation for the CLI type Double. +
++ The type of single-precision floating point numbers, annotated with a unit of measure. + The unit of measure is erased in compiled code and when values of this type + are analyzed using reflection. The type is representationally equivalent to + Single. + +
++ An abbreviation for the CLI type Single. +
++ Type of a formatting expression. +
++ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+ Type of a formatting expression. +
++ Helper types for active patterns with 2 choices. +
++ Union case + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ Choice1Of2 'T1
+ + + Parameters: +
'T1
+
+ + + |
+
+
+
+
+
+ + Choice 1 of 2 choices + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Choice2Of2 'T2
+ + + Parameters: +
'T2
+
+ + + |
+
+
+
+
+
+ + Choice 2 of 2 choices + + |
+
+ Helper types for active patterns with 3 choices. +
++ Union case + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ Choice1Of3 'T1
+ + + Parameters: +
'T1
+
+ + + |
+
+
+
+
+
+ + Choice 1 of 3 choices + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Choice2Of3 'T2
+ + + Parameters: +
'T2
+
+ + + |
+
+
+
+
+
+ + Choice 2 of 3 choices + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Choice3Of3 'T3
+ + + Parameters: +
'T3
+
+ + + |
+
+
+
+
+
+ + Choice 3 of 3 choices + + |
+
+ Helper types for active patterns with 4 choices. +
++ Union case + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ Choice1Of4 'T1
+ + + Parameters: +
'T1
+
+ + + |
+
+
+
+
+
+ + Choice 1 of 4 choices + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Choice2Of4 'T2
+ + + Parameters: +
'T2
+
+ + + |
+
+
+
+
+
+ + Choice 2 of 4 choices + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Choice3Of4 'T3
+ + + Parameters: +
'T3
+
+ + + |
+
+
+
+
+
+ + Choice 3 of 4 choices + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Choice4Of4 'T4
+ + + Parameters: +
'T4
+
+ + + |
+
+
+
+
+
+ + Choice 4 of 4 choices + + |
+
+ Helper types for active patterns with 5 choices. +
++ Union case + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ Choice1Of5 'T1
+ + + Parameters: +
'T1
+
+ + + |
+
+
+
+
+
+ + Choice 1 of 5 choices + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Choice2Of5 'T2
+ + + Parameters: +
'T2
+
+ + + |
+
+
+
+
+
+ + Choice 2 of 5 choices + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Choice3Of5 'T3
+ + + Parameters: +
'T3
+
+ + + |
+
+
+
+
+
+ + Choice 3 of 5 choices + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Choice4Of5 'T4
+ + + Parameters: +
'T4
+
+ + + |
+
+
+
+
+
+ + Choice 4 of 5 choices + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Choice5Of5 'T5
+ + + Parameters: +
'T5
+
+ + + |
+
+
+
+
+
+ + Choice 5 of 5 choices + + |
+
+ Helper types for active patterns with 6 choices. +
++ Union case + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ Choice1Of6 'T1
+ + + Parameters: +
'T1
+
+ + + |
+
+
+
+
+
+ + Choice 1 of 6 choices + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Choice2Of6 'T2
+ + + Parameters: +
'T2
+
+ + + |
+
+
+
+
+
+ + Choice 2 of 6 choices + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Choice3Of6 'T3
+ + + Parameters: +
'T3
+
+ + + |
+
+
+
+
+
+ + Choice 3 of 6 choices + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Choice4Of6 'T4
+ + + Parameters: +
'T4
+
+ + + |
+
+
+
+
+
+ + Choice 4 of 6 choices + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Choice5Of6 'T5
+ + + Parameters: +
'T5
+
+ + + |
+
+
+
+
+
+ + Choice 5 of 6 choices + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Choice6Of6 'T6
+ + + Parameters: +
'T6
+
+ + + |
+
+
+
+
+
+ + Choice 6 of 6 choices + + |
+
+ Helper types for active patterns with 7 choices. +
++ Union case + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ Choice1Of7 'T1
+ + + Parameters: +
'T1
+
+ + + |
+
+
+
+
+
+ + Choice 1 of 7 choices + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Choice2Of7 'T2
+ + + Parameters: +
'T2
+
+ + + |
+
+
+
+
+
+ + Choice 2 of 7 choices + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Choice3Of7 'T3
+ + + Parameters: +
'T3
+
+ + + |
+
+
+
+
+
+ + Choice 3 of 7 choices + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Choice4Of7 'T4
+ + + Parameters: +
'T4
+
+ + + |
+
+
+
+
+
+ + Choice 4 of 7 choices + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Choice5Of7 'T5
+ + + Parameters: +
'T5
+
+ + + |
+
+
+
+
+
+ + Choice 5 of 7 choices + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Choice6Of7 'T6
+ + + Parameters: +
'T6
+
+ + + |
+
+
+
+
+
+ + Choice 6 of 7 choices + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Choice7Of7 'T7
+ + + Parameters: +
'T7
+
+ + + |
+
+
+
+
+
+ + Choice 7 of 7 choices + + |
+
+ The CLI type used to represent F# function values. This type is not + typically used directly, though may be used from other CLI languages. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Invoke
+ + + Parameters: +
'T
+ -
+
+
+ + + + Returns: + 'U
+
+ 'U
+ + Modifiers: + abstract + + |
+
+
+
+ + ++
|
+
+ Static member + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FSharpFunc.FromConverter(converter)
+ + + Parameters: +
Converter<'T, 'U>
+ -
+ The input System.Converter.
+
+ + + + Returns: + 'T -> 'U
+
+ An F# function of the same type.
+ + |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FSharpFunc.InvokeFast(func, arg1, arg2)
+ + + Parameters: +
FSharpFunc<'T, ('U -> 'V)>
+ -
+ The input function.
+
+ + + + arg1 + + : + 'T
+ -
+ The first arg.
+
+ + + + arg2 + + : + 'U
+ -
+ The second arg.
+
+ + + + Returns: + 'V
+
+ The function result.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Invoke an F# first class function value with two curried arguments. In some cases this + will result in a more efficient application than applying the arguments successively. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FSharpFunc.InvokeFast(func, arg1, arg2, arg3)
+ + + Parameters: +
FSharpFunc<'T, ('U -> 'V -> 'W)>
+ -
+ The input function.
+
+ + + + arg1 + + : + 'T
+ -
+ The first arg.
+
+ + + + arg2 + + : + 'U
+ -
+ The second arg.
+
+ + + + arg3 + + : + 'V
+ -
+ The third arg.
+
+ + + + Returns: + 'W
+
+ The function result.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Invoke an F# first class function value with three curried arguments. In some cases this + will result in a more efficient application than applying the arguments successively. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FSharpFunc.InvokeFast(func, arg1, arg2, arg3, arg4)
+ + + Parameters: +
FSharpFunc<'T, ('U -> 'V -> 'W -> 'X)>
+ -
+ The input function.
+
+ + + + arg1 + + : + 'T
+ -
+ The first arg.
+
+ + + + arg2 + + : + 'U
+ -
+ The second arg.
+
+ + + + arg3 + + : + 'V
+ -
+ The third arg.
+
+ + + + arg4 + + : + 'W
+ -
+ The fourth arg.
+
+ + + + Returns: + 'X
+
+ The function result.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Invoke an F# first class function value with four curried arguments. In some cases this + will result in a more efficient application than applying the arguments successively. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FSharpFunc.InvokeFast(func, arg1, arg2, arg3, arg4, arg5)
+ + + Parameters: +
FSharpFunc<'T, ('U -> 'V -> 'W -> 'X -> 'Y)>
+ -
+ The input function.
+
+ + + + arg1 + + : + 'T
+ -
+ The first arg.
+
+ + + + arg2 + + : + 'U
+ -
+ The second arg.
+
+ + + + arg3 + + : + 'V
+ -
+ The third arg.
+
+ + + + arg4 + + : + 'W
+ -
+ The fourth arg.
+
+ + + + arg5 + + : + 'X
+ -
+ The fifth arg.
+
+ + + + Returns: + 'Y
+
+ The function result.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Invoke an F# first class function value with five curried arguments. In some cases this + will result in a more efficient application than applying the arguments successively. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FSharpFunc.ToConverter(func)
+ + + Parameters: +
'T -> 'U
+ -
+ The input function.
+
+ + + + Returns: + Converter<'T, 'U>
+
+ System.Converter<'T,'U>
+ + |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FSharpFunc.op_Implicit converter
+ + + Parameters: +
Converter<'T, 'U>
+ -
+ The input System.Converter.
+
+ + + + Returns: + 'T -> 'U
+
+ An F# function of the same type.
+ + |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FSharpFunc.op_Implicit func
+ + + Parameters: +
'T -> 'U
+ -
+ The input function.
+
+ + + + Returns: + Converter<'T, 'U>
+
+ A System.Converter of the function type.
+ + |
+ + + | +
+ This attribute is added to generated assemblies to indicate the + version of the data schema used to encode additional F# + specific information in the resource attached to compiled F# libraries. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ FSharpInterfaceDataVersionAttribute(major, minor, release)
+ + + Parameters: +
int
+ -
+ The major version number.
+
+ + + + minor + + : + int
+ -
+ The minor version number.
+
+ + + + release + + : + int
+ -
+ The release number.
+
+ + + + Returns: + FSharpInterfaceDataVersionAttribute
+
+ FSharpInterfaceDataVersionAttribute
+ + |
+
+
+
+ + ++
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+ Helper type for error handling without exceptions. +
++ Union case + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ Error ErrorValue
+ + + Parameters: +
'TError
+
+ + + |
+
+
+
+
+
+ + + Represents an Error or a Failure. The code failed with a value of 'TError representing what went wrong. + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Ok ResultValue
+ + + Parameters: +
'T
+
+ + + |
+
+
+
+
+
+ + + Represents an OK or a Successful result. The code succeeded with a value of 'T. + + + |
+
+ The CLI type used to represent F# first-class type function values. This type is for use + by compiled F# code. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Specialize
+ + + + Returns: + obj
+
+ The specialized type.
+ + Modifiers: + abstract + + Type parameters: + 'T + |
+ + + | +
+ Helper functions for converting F# first class function values to and from CLI representations + of functions using delegates. +
++ Static member + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FuncConvert.FromAction(action)
+ + + Parameters: +
Action<'T1, 'T2, 'T3, 'T4, 'T5>
+ -
+ The input Action delegate.
+
+ + + + Returns: + 'T1 -> 'T2 -> 'T3 -> 'T4 -> 'T5 -> unit
+
+ The F# function.
+ + Modifiers: + inline + + Type parameters: + 'T1, 'T2, 'T3, 'T4, 'T5 + |
+ + + | +
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FuncConvert.FromFunc(func)
+ + + Parameters: +
Func<'T1, 'T2, 'T3, 'T4, 'T5, 'U>
+ -
+ The input Func delegate.
+
+ + + + Returns: + 'T1 -> 'T2 -> 'T3 -> 'T4 -> 'T5 -> 'U
+
+ The F# function.
+ + Modifiers: + inline + + Type parameters: + 'T1, 'T2, 'T3, 'T4, 'T5, 'U + |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FuncConvert.FromFunc(func)
+ + + Parameters: +
Func<'T1, 'T2, 'T3, 'T4, 'U>
+ -
+ The input Func delegate.
+
+ + + + Returns: + 'T1 -> 'T2 -> 'T3 -> 'T4 -> 'U
+
+ The F# function.
+ + Modifiers: + inline + + Type parameters: + 'T1, 'T2, 'T3, 'T4, 'U + |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FuncConvert.FromFunc(func)
+ + + Parameters: +
Func<'T1, 'T2, 'T3, 'U>
+ -
+ The input Func delegate.
+
+ + + + Returns: + 'T1 -> 'T2 -> 'T3 -> 'U
+
+ The F# function.
+ + Modifiers: + inline + + Type parameters: + 'T1, 'T2, 'T3, 'U + |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FuncConvert.FromFunc(func)
+ + + Parameters: +
Func<'T1, 'T2, 'U>
+ -
+ The input Func delegate.
+
+ + + + Returns: + 'T1 -> 'T2 -> 'U
+
+ The F#funcfunction.
+ + Modifiers: + inline + + Type parameters: + 'T1, 'T2, 'U + |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FuncConvert.FromFunc(func)
+ + + Parameters: +
Func<'T, 'U>
+ -
+ The input Func delegate.
+
+ + + + Returns: + 'T -> 'U
+
+ The F# function.
+ + Modifiers: + inline + + Type parameters: + 'T, 'U + |
+ + + | +
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FuncConvert.FuncFromTupled(func)
+ + + Parameters: +
'T1 * 'T2 * 'T3 * 'T4 * 'T5 -> 'U
+ -
+ The input tupled function.
+
+ + + + Returns: + 'T1 -> 'T2 -> 'T3 -> 'T4 -> 'T5 -> 'U
+
+ The output curried function.
+ + Modifiers: + inline + + Type parameters: + 'T1, 'T2, 'T3, 'T4, 'T5, 'U + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A utility function to convert function values from tupled to curried form + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FuncConvert.FuncFromTupled(func)
+ + + Parameters: +
'T1 * 'T2 * 'T3 * 'T4 -> 'U
+ -
+ The input tupled function.
+
+ + + + Returns: + 'T1 -> 'T2 -> 'T3 -> 'T4 -> 'U
+
+ The output curried function.
+ + Modifiers: + inline + + Type parameters: + 'T1, 'T2, 'T3, 'T4, 'U + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A utility function to convert function values from tupled to curried form + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FuncConvert.FuncFromTupled(func)
+ + + Parameters: +
'T1 * 'T2 * 'T3 -> 'U
+ -
+ The input tupled function.
+
+ + + + Returns: + 'T1 -> 'T2 -> 'T3 -> 'U
+
+ The output curried function.
+ + Modifiers: + inline + + Type parameters: + 'T1, 'T2, 'T3, 'U + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A utility function to convert function values from tupled to curried form + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FuncConvert.FuncFromTupled(func)
+ + + Parameters: +
'T1 * 'T2 -> 'U
+ -
+ The input tupled function.
+
+ + + + Returns: + 'T1 -> 'T2 -> 'U
+
+ The output curried function.
+ + Modifiers: + inline + + Type parameters: + 'T1, 'T2, 'U + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A utility function to convert function values from tupled to curried form + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FuncConvert.ToFSharpFunc(converter)
+ + + Parameters: +
Converter<'T, 'U>
+ -
+ The input Converter delegate.
+
+ + + + Returns: + 'T -> 'U
+
+ The F# function.
+ + Modifiers: + inline + + Type parameters: + 'T, 'U + |
+ + + | +
+
+
+
+
+
+
+ |
+ + + | +
+ Adding this attribute to a non-function value with generic parameters indicates that + uses of the construct can give rise to generic code through type inference. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GeneralizableValueAttribute()
+ + + + Returns: + GeneralizableValueAttribute
+
+ GeneralizableValueAttribute
+ + |
+
+
+
+ + ++
|
+
+ Represents an Common IL (Intermediate Language) Signature Pointer. +
+
+ This type should only be used when writing F# code that interoperates
+ with other .NET languages that use generic Common IL Signature Pointers.
+ Use of this type in F# code may result in unverifiable code being generated.
+ Because of the rules of Common IL Signature Pointers, you cannot use this type in generic type parameters,
+ resulting in compiler errors. As a result, you should convert this type to nativeptr{T}
+ for use in F#. Note that Common IL Signature Pointers exposed by other .NET languages are converted to
+ nativeptr{T} or voidptr automatically by F#,
+ and F# also shows generic-specialized typed native pointers correctly to other .NET languages as Common IL Signature Pointers.
+ However, generic typed native pointers are shown as IntPtr to other .NET languages.
+ For other languages to interpret generic F# typed native pointers correctly, you should expose this type or
+ voidptr instead of nativeptr{T}.
+ Values of this type can be generated by the functions in the NativeInterop.NativePtr
module.
+
+ Adding this attribute to a parameter of function type indicates that, if the overall function or method is inlined and the parameter is + determined to be a known lambda, then this function should be statically inlined throughout the body of the function of method. +
++ If the function parameter is called multiple times in the implementation of the function or method this attribute may cause code explosion and slow compilation times. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ InlineIfLambdaAttribute()
+ + + + Returns: + InlineIfLambdaAttribute
+
+ InlineIfLambdaAttribute
+ + |
+
+
+
+ + ++
|
+
+ Represents a in-argument or readonly managed pointer in F# code. This type should only be used with F# 4.5+. +
++ The type of 32-bit signed integer numbers, annotated with a unit of measure. The unit + of measure is erased in compiled code and when values of this type + are analyzed using reflection. The type is representationally equivalent to + Int32. +
++ An abbreviation for the CLI type Int32. +
++ The type of 16-bit signed integer numbers, annotated with a unit of measure. The unit + of measure is erased in compiled code and when values of this type + are analyzed using reflection. The type is representationally equivalent to + Int16. +
++ An abbreviation for the CLI type Int16. +
++ The type of 32-bit signed integer numbers, annotated with a unit of measure. + The unit of measure is erased in compiled code and when values of this type + are analyzed using reflection. The type is representationally equivalent to + Int32. +
++ An abbreviation for the CLI type Int32. +
++ The type of 64-bit signed integer numbers, annotated with a unit of measure. The unit + of measure is erased in compiled code and when values of this type + are analyzed using reflection. The type is representationally equivalent to + Int64. +
++ An abbreviation for the CLI type Int64. +
++ The type of 8-bit signed integer numbers, annotated with a unit of measure. + The unit of measure is erased in compiled code and when values of this type + are analyzed using reflection. The type is representationally equivalent to + SByte. +
++ An abbreviation for the CLI type SByte. +
++ Adding this attribute to a type causes it to be represented using a CLI interface. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ InterfaceAttribute()
+ + + + Returns: + InterfaceAttribute
+
+ InterfaceAttribute
+ + |
+
+
+
+ + ++
|
+
+ For compiler use only +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+
+ |
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
|
+
+
+
+
+
+
+
+
+
+ |
+
+
|
+
+
+
+
+
+
+
+
+
+ |
+
+
|
+
+
+
+
+
+
+
+
+ |
+
+
|
+
+ The F# compiler emits calls to some of the functions in this module as part of the compiled form of some language constructs +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FastCompareTuple4 comparer tuple1 tuple2
+ + + Parameters: +
IComparer
+
+ + + + tuple1 + + : + 'T1 * 'T2 * 'T3 * 'T4
+
+ + + + tuple2 + + : + 'T1 * 'T2 * 'T3 * 'T4
+
+ + + + Returns: + int
+
+ + Modifiers: + inline + + Type parameters: + 'T1, 'T2, 'T3, 'T4 + |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FastCompareTuple5 comparer tuple1 tuple2
+ + + Parameters: +
IComparer
+
+ + + + tuple1 + + : + 'T1 * 'T2 * 'T3 * 'T4 * 'T5
+
+ + + + tuple2 + + : + 'T1 * 'T2 * 'T3 * 'T4 * 'T5
+
+ + + + Returns: + int
+
+ + Modifiers: + inline + + Type parameters: + 'T1, 'T2, 'T3, 'T4, 'T5 + |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FastEqualsTuple2 comparer tuple1 tuple2
+ + + Parameters: +
IEqualityComparer
+
+ + + + tuple1 + + : + 'T1 * 'T2
+
+ + + + tuple2 + + : + 'T1 * 'T2
+
+ + + + Returns: + bool
+
+ + Modifiers: + inline + + Type parameters: + 'T1, 'T2 + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A primitive entry point used by the F# compiler for optimization purposes. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FastEqualsTuple3 comparer tuple1 tuple2
+ + + Parameters: +
IEqualityComparer
+
+ + + + tuple1 + + : + 'T1 * 'T2 * 'T3
+
+ + + + tuple2 + + : + 'T1 * 'T2 * 'T3
+
+ + + + Returns: + bool
+
+ + Modifiers: + inline + + Type parameters: + 'T1, 'T2, 'T3 + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A primitive entry point used by the F# compiler for optimization purposes. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FastEqualsTuple4 comparer tuple1 tuple2
+ + + Parameters: +
IEqualityComparer
+
+ + + + tuple1 + + : + 'T1 * 'T2 * 'T3 * 'T4
+
+ + + + tuple2 + + : + 'T1 * 'T2 * 'T3 * 'T4
+
+ + + + Returns: + bool
+
+ + Modifiers: + inline + + Type parameters: + 'T1, 'T2, 'T3, 'T4 + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A primitive entry point used by the F# compiler for optimization purposes. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FastEqualsTuple5 comparer tuple1 tuple2
+ + + Parameters: +
IEqualityComparer
+
+ + + + tuple1 + + : + 'T1 * 'T2 * 'T3 * 'T4 * 'T5
+
+ + + + tuple2 + + : + 'T1 * 'T2 * 'T3 * 'T4 * 'T5
+
+ + + + Returns: + bool
+
+ + Modifiers: + inline + + Type parameters: + 'T1, 'T2, 'T3, 'T4, 'T5 + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A primitive entry point used by the F# compiler for optimization purposes. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FastHashTuple2 comparer tuple
+ + + Parameters: +
IEqualityComparer
+
+ + + + tuple + + : + 'T1 * 'T2
+
+ + + + Returns: + int
+
+ + Modifiers: + inline + + Type parameters: + 'T1, 'T2 + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A primitive entry point used by the F# compiler for optimization purposes. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FastHashTuple3 comparer tuple
+ + + Parameters: +
IEqualityComparer
+
+ + + + tuple + + : + 'T1 * 'T2 * 'T3
+
+ + + + Returns: + int
+
+ + Modifiers: + inline + + Type parameters: + 'T1, 'T2, 'T3 + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A primitive entry point used by the F# compiler for optimization purposes. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FastHashTuple4 comparer tuple
+ + + Parameters: +
IEqualityComparer
+
+ + + + tuple + + : + 'T1 * 'T2 * 'T3 * 'T4
+
+ + + + Returns: + int
+
+ + Modifiers: + inline + + Type parameters: + 'T1, 'T2, 'T3, 'T4 + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A primitive entry point used by the F# compiler for optimization purposes. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FastHashTuple5 comparer tuple
+ + + Parameters: +
IEqualityComparer
+
+ + + + tuple + + : + 'T1 * 'T2 * 'T3 * 'T4 * 'T5
+
+ + + + Returns: + int
+
+ + Modifiers: + inline + + Type parameters: + 'T1, 'T2, 'T3, 'T4, 'T5 + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A primitive entry point used by the F# compiler for optimization purposes. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GenericComparisonIntrinsic x y
+ + + Parameters: +
'T
+
+ + + + y + + : + 'T
+
+ + + + Returns: + int
+
+ + |
+ + + | +
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GenericEqualityERIntrinsic x y
+ + + Parameters: +
'T
+
+ + + + y + + : + 'T
+
+ + + + Returns: + bool
+
+ + |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GenericEqualityIntrinsic x y
+ + + Parameters: +
'T
+
+ + + + y + + : + 'T
+
+ + + + Returns: + bool
+
+ + |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GenericEqualityWithComparerIntrinsic comp x y
+ + + Parameters: +
IEqualityComparer
+
+ + + + x + + : + 'T
+
+ + + + y + + : + 'T
+
+ + + + Returns: + bool
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A primitive entry point used by the F# compiler for optimization purposes. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GenericGreaterOrEqualIntrinsic x y
+ + + Parameters: +
'T
+
+ + + + y + + : + 'T
+
+ + + + Returns: + bool
+
+ + |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GenericGreaterThanIntrinsic x y
+ + + Parameters: +
'T
+
+ + + + y + + : + 'T
+
+ + + + Returns: + bool
+
+ + |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GenericHashIntrinsic input
+ + + Parameters: +
'T
+
+ + + + Returns: + int
+
+ + |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GenericHashWithComparerIntrinsic comp input
+ + + Parameters: +
IEqualityComparer
+
+ + + + input + + : + 'T
+
+ + + + Returns: + int
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A primitive entry point used by the F# compiler for optimization purposes. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GenericLessOrEqualIntrinsic x y
+ + + Parameters: +
'T
+
+ + + + y + + : + 'T
+
+ + + + Returns: + bool
+
+ + |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GenericLessThanIntrinsic x y
+ + + Parameters: +
'T
+
+ + + + y + + : + 'T
+
+ + + + Returns: + bool
+
+ + |
+ + + | +
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ PhysicalEqualityIntrinsic x y
+ + + Parameters: +
'T
+
+ + + + y + + : + 'T
+
+ + + + Returns: + bool
+
+ + |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ PhysicalHashIntrinsic input
+ + + Parameters: +
'T
+
+ + + + Returns: + int
+
+ + |
+ + + | +
+ The F# compiler emits calls to some of the functions in this module as part of the compiled form of some language constructs +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ CheckThis arg1
+ + + Parameters: +
'T
+
+ + + + Returns: + 'T
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A compiler intrinsic for checking initialization soundness of recursive bindings + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ CreateInstance ()
+ + + Parameters: +
unit
+
+ + + + Returns: + 'T
+
+ + Modifiers: + inline + + Type parameters: + 'T + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ Dispose resource
+ + + Parameters: +
'T
+
+ + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A compiler intrinsic for the efficient compilation of sequence expressions + + |
+
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ GetArray source index
+ + + Parameters: +
'T[]
+
+ + + + index + + : + int
+
+ + + + Returns: + 'T
+
+ + Modifiers: + inline + + Type parameters: + 'T + |
+ + + | +
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GetArray4D source index1 index2 index3 index4
+ + + Parameters: +
'T[,,,]
+
+ + + + index1 + + : + int
+
+ + + + index2 + + : + int
+
+ + + + index3 + + : + int
+
+ + + + index4 + + : + int
+
+ + + + Returns: + 'T
+
+ + Modifiers: + inline + + Type parameters: + 'T + |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ SetArray target index value
+ + + Parameters: +
'T[]
+
+ + + + index + + : + int
+
+ + + + value + + : + 'T
+
+ + + Modifiers: + inline + + Type parameters: + 'T + |
+ + + | +
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ SetArray4D target index1 index2 index3 index4 value
+ + + Parameters: +
'T[,,,]
+
+ + + + index1 + + : + int
+
+ + + + index2 + + : + int
+
+ + + + index3 + + : + int
+
+ + + + index4 + + : + int
+
+ + + + value + + : + 'T
+
+ + + Modifiers: + inline + + Type parameters: + 'T + |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ UnboxFast source
+ + + Parameters: +
obj
+
+ + + + Returns: + 'T
+
+ + Modifiers: + inline + + Type parameters: + 'T + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ UnboxGeneric source
+ + + Parameters: +
obj
+
+ + + + Returns: + 'T
+
+ + |
+ + + | +
+ The F# compiler emits calls to some of the functions in this module as part of the compiled form of some language constructs +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Binary 'and'. When used as a binary operator the right hand value is evaluated only on demand + + |
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Binary 'or'. When used as a binary operator the right hand value is evaluated only on demand + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ~&&obj
+ + + Parameters: +
'T
+ -
+ The input object.
+
+ + + + Returns: + nativeptr<'T>
+
+ The unmanaged pointer.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+ + + | +
+ + | ++ + | +
+
+
+
+
+
+ |
+ + + | +
+ Language primitives associated with the F# language +
++ Modules + | ++ Description + | +
+ + + + ErrorStrings + + + + |
+ + + | +
+ + + + HashCompare + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + The F# compiler emits calls to some of the functions in this module as part of the compiled form of some language constructs + + |
+
+ + + + IntrinsicFunctions + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + The F# compiler emits calls to some of the functions in this module as part of the compiled form of some language constructs + + |
+
+ + + + IntrinsicOperators + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + The F# compiler emits calls to some of the functions in this module as part of the compiled form of some language constructs + + |
+
+ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ AdditionDynamic x y
+ + + Parameters: +
'T1
+
+ + + + y + + : + 'T2
+
+ + + + Returns: + 'U
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A compiler intrinsic that implements dynamic invocations to the '+' operator. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ BitwiseAndDynamic x y
+ + + Parameters: +
'T1
+
+ + + + y + + : + 'T2
+
+ + + + Returns: + 'U
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A compiler intrinsic that implements dynamic invocations to the '&&&' operator. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ BitwiseOrDynamic x y
+ + + Parameters: +
'T1
+
+ + + + y + + : + 'T2
+
+ + + + Returns: + 'U
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A compiler intrinsic that implements dynamic invocations to the '|||' operator. + + |
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ CheckedAdditionDynamic x y
+ + + Parameters: +
'T1
+
+ + + + y + + : + 'T2
+
+ + + + Returns: + 'U
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A compiler intrinsic that implements dynamic invocations to the checked '+' operator. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ CheckedExplicitDynamic value
+ + + Parameters: +
'T
+
+ + + + Returns: + 'U
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A compiler intrinsic that implements dynamic invocations related to checked conversion operators. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ CheckedMultiplyDynamic x y
+ + + Parameters: +
'T1
+
+ + + + y + + : + 'T2
+
+ + + + Returns: + 'U
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A compiler intrinsic that implements dynamic invocations to the checked '*' operator. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ CheckedSubtractionDynamic x y
+ + + Parameters: +
'T1
+
+ + + + y + + : + 'T2
+
+ + + + Returns: + 'U
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A compiler intrinsic that implements dynamic invocations to the checked '-' operator. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ CheckedUnaryNegationDynamic value
+ + + Parameters: +
'T
+
+ + + + Returns: + 'U
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A compiler intrinsic that implements dynamic invocations to the checked unary '-' operator. + + |
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ DivideByInt x y
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + y + + : + int
+ -
+ The input int.
+
+ + + + Returns: + ^T
+
+ The division result.
+ + Modifiers: + inline + + Type parameters: + ^T + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ DivideByIntDynamic x y
+ + + Parameters: +
'T
+
+ + + + y + + : + int
+
+ + + + Returns: + 'T
+
+ + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ DivisionDynamic x y
+ + + Parameters: +
'T1
+
+ + + + y + + : + 'T2
+
+ + + + Returns: + 'U
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A compiler intrinsic that implements dynamic invocations to the '/' operator. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ EnumOfValue value
+ + + Parameters: +
'T
+ -
+ The input value.
+
+ + + + Returns: + 'Enum
+
+ The value as an enumeration.
+ + Modifiers: + inline + + Type parameters: + 'T, 'Enum + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ EnumToValue enum
+ + + Parameters: +
'Enum
+ -
+ The input enum.
+
+ + + + Returns: + 'T
+
+ The enumeration as a value.
+ + Modifiers: + inline + + Type parameters: + 'Enum, 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ EqualityDynamic x y
+ + + Parameters: +
'T1
+
+ + + + y + + : + 'T2
+
+ + + + Returns: + 'U
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A compiler intrinsic that implements dynamic invocations related to the '=' operator. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ExclusiveOrDynamic x y
+ + + Parameters: +
'T1
+
+ + + + y + + : + 'T2
+
+ + + + Returns: + 'U
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A compiler intrinsic that implements dynamic invocations related to the '^^^' operator. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ExplicitDynamic value
+ + + Parameters: +
'T
+
+ + + + Returns: + 'U
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A compiler intrinsic that implements dynamic invocations related to conversion operators. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FastGenericComparer
+ + + + Returns: + IComparer<'T>
+
+ + Modifiers: + inline + + Type parameters: + 'T + |
+ + + | +
+
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FastGenericEqualityComparer
+ + + + Returns: + IEqualityComparer<'T>
+
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FastLimitedGenericEqualityComparer limit
+ + + Parameters: +
int
+ -
+ The input limit on the number of nodes.
+
+ + + + Returns: + IEqualityComparer<'T>
+
+ System.Collections.Generic.IEqualityComparer<'T>
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Make an F# hash/equality object for the given type using node-limited hashing when hashing F# + records, lists and union types. + + |
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ GenericComparison e1 e2
+ + + Parameters: +
'T
+ -
+ The first value.
+
+ + + + e2 + + : + 'T
+ -
+ The second value.
+
+ + + + Returns: + int
+
+ The result of the comparison.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GenericComparisonWithComparer comp e1 e2
+ + + Parameters: +
IComparer
+ -
+ The function to compare the values.
+
+ + + + e1 + + : + 'T
+ -
+ The first value.
+
+ + + + e2 + + : + 'T
+ -
+ The second value.
+
+ + + + Returns: + int
+
+ The result of the comparison.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Compare two values. May be called as a recursive case from an implementation of System.IComparable to + ensure consistent NaN comparison semantics. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GenericEquality e1 e2
+ + + Parameters: +
'T
+ -
+ The first value.
+
+ + + + e2 + + : + 'T
+ -
+ The second value.
+
+ + + + Returns: + bool
+
+ The result of the comparison.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Compare two values for equality using partial equivalence relation semantics ([nan] <> [nan]) + + |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Return an F# comparer object suitable for hashing and equality. This hashing behaviour + of the returned comparer is not limited by an overall node count when hashing F# + records, lists and union types. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GenericEqualityER e1 e2
+ + + Parameters: +
'T
+ -
+ The first value.
+
+ + + + e2 + + : + 'T
+ -
+ The second value.
+
+ + + + Returns: + bool
+
+ The result of the comparison.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+ + + | +
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Return an F# comparer object suitable for hashing and equality. This hashing behaviour + of the returned comparer is not limited by an overall node count when hashing F# + records, lists and union types. This equality comparer has equivalence + relation semantics ([nan] = [nan]). + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GenericEqualityWithComparer comp e1 e2
+ + + Parameters: +
IEqualityComparer
+ -
+
+
+ + + + e1 + + : + 'T
+ -
+ The first value.
+
+ + + + e2 + + : + 'T
+ -
+ The second value.
+
+ + + + Returns: + bool
+
+ The result of the comparison.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GenericGreaterOrEqual e1 e2
+ + + Parameters: +
'T
+ -
+ The first value.
+
+ + + + e2 + + : + 'T
+ -
+ The second value.
+
+ + + + Returns: + bool
+
+ The result of the comparison.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GenericGreaterThan e1 e2
+ + + Parameters: +
'T
+ -
+ The first value.
+
+ + + + e2 + + : + 'T
+ -
+ The second value.
+
+ + + + Returns: + bool
+
+ The result of the comparison.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ GenericHash obj
+ + + Parameters: +
'T
+ -
+ The input object.
+
+ + + + Returns: + int
+
+ The hashed value.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GenericHashWithComparer comparer obj
+ + + Parameters: +
IEqualityComparer
+ -
+ The comparison function.
+
+ + + + obj + + : + 'T
+ -
+ The input object.
+
+ + + + Returns: + int
+
+ The hashed value.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GenericLessOrEqual e1 e2
+ + + Parameters: +
'T
+ -
+ The first value.
+
+ + + + e2 + + : + 'T
+ -
+ The second value.
+
+ + + + Returns: + bool
+
+ The result of the comparison.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ GenericLessThan e1 e2
+ + + Parameters: +
'T
+ -
+ The first value.
+
+ + + + e2 + + : + 'T
+ -
+ The second value.
+
+ + + + Returns: + bool
+
+ The result of the comparison.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+ + + | +
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Hash a value according to its structure. Use the given limit to restrict the hash when hashing F# + records, lists and union types. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GenericMaximum e1 e2
+ + + Parameters: +
'T
+ -
+ The first value.
+
+ + + + e2 + + : + 'T
+ -
+ The second value.
+
+ + + + Returns: + 'T
+
+ The maximum value.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Take the maximum of two values structurally according to the order given by GenericComparison + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GenericMinimum e1 e2
+ + + Parameters: +
'T
+ -
+ The first value.
+
+ + + + e2 + + : + 'T
+ -
+ The second value.
+
+ + + + Returns: + 'T
+
+ The minimum value.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Take the minimum of two values structurally according to the order given by GenericComparison + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GenericOne
+ + + + Returns: + ^T
+
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Resolves to the value 'one' for any primitive numeric type or any type with a static member called 'One' + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GenericOneDynamic ()
+ + + Parameters: +
unit
+
+ + + + Returns: + 'T
+
+ + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ GenericZero
+ + + + Returns: + ^T
+
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Resolves to the zero value for any primitive numeric type or any type with a static member called 'Zero' + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GenericZeroDynamic ()
+ + + Parameters: +
unit
+
+ + + + Returns: + 'T
+
+ + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ GreaterThanDynamic x y
+ + + Parameters: +
'T1
+
+ + + + y + + : + 'T2
+
+ + + + Returns: + 'U
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A compiler intrinsic that implements dynamic invocations related to the '>' operator. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GreaterThanOrEqualDynamic x y
+ + + Parameters: +
'T1
+
+ + + + y + + : + 'T2
+
+ + + + Returns: + 'U
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A compiler intrinsic that implements dynamic invocations related to the '>=' operator. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ InequalityDynamic x y
+ + + Parameters: +
'T1
+
+ + + + y + + : + 'T2
+
+ + + + Returns: + 'U
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A compiler intrinsic that implements dynamic invocations related to the '=' operator. + + |
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ LeftShiftDynamic value shift
+ + + Parameters: +
'T1
+
+ + + + shift + + : + 'T2
+
+ + + + Returns: + 'U
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A compiler intrinsic that implements dynamic invocations to the '<<<' operator. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ LessThanDynamic x y
+ + + Parameters: +
'T1
+
+ + + + y + + : + 'T2
+
+ + + + Returns: + 'U
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A compiler intrinsic that implements dynamic invocations related to the '<' operator. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ LessThanOrEqualDynamic x y
+ + + Parameters: +
'T1
+
+ + + + y + + : + 'T2
+
+ + + + Returns: + 'U
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A compiler intrinsic that implements dynamic invocations related to the '<=' operator. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ LogicalNotDynamic value
+ + + Parameters: +
'T
+
+ + + + Returns: + 'U
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A compiler intrinsic that implements dynamic invocations related to the '~~~' operator. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ModulusDynamic x y
+ + + Parameters: +
'T1
+
+ + + + y + + : + 'T2
+
+ + + + Returns: + 'U
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A compiler intrinsic that implements dynamic invocations to the '%' operator. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ MultiplyDynamic x y
+ + + Parameters: +
'T1
+
+ + + + y + + : + 'T2
+
+ + + + Returns: + 'U
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A compiler intrinsic that implements dynamic invocations to the '*' operator. + + |
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ PhysicalEquality e1 e2
+ + + Parameters: +
'T
+ -
+ The first value.
+
+ + + + e2 + + : + 'T
+ -
+ The second value.
+
+ + + + Returns: + bool
+
+ The result of the comparison.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Reference/physical equality. + True if the inputs are reference-equal, false otherwise. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ PhysicalHash obj
+ + + Parameters: +
'T
+ -
+ The input object.
+
+ + + + Returns: + int
+
+ The hashed value.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ RightShiftDynamic value shift
+ + + Parameters: +
'T1
+
+ + + + shift + + : + 'T2
+
+ + + + Returns: + 'U
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A compiler intrinsic that implements dynamic invocations to the '>>>' operator. + + |
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ SubtractionDynamic x y
+ + + Parameters: +
'T1
+
+ + + + y + + : + 'T2
+
+ + + + Returns: + 'U
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A compiler intrinsic that implements dynamic invocations to the '-' operator. + + |
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ UIntPtrWithMeasure input
+ + + Parameters: +
unativeint
+ -
+ The input unativeint.
+
+ + + + Returns: + unativeint<'Measure>
+
+ The unativeint with units-of-measure.
+ + Modifiers: + inline + + Type parameters: + 'Measure + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ UnaryNegationDynamic value
+ + + Parameters: +
'T
+
+ + + + Returns: + 'U
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A compiler intrinsic that implements dynamic invocations to the unary '-' operator. + + |
+
+ Adding this attribute to a value causes it to be compiled as a CLI constant literal. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
|
+
+ Non-exhaustive match failures will raise the MatchFailureException exception +
++ Adding this attribute to a type causes it to be interpreted as a refined type, currently limited to measure-parameterized types. + This may only be used under very limited conditions. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ MeasureAnnotatedAbbreviationAttribute()
+ + + + Returns: + MeasureAnnotatedAbbreviationAttribute
+
+ MeasureAnnotatedAbbreviationAttribute
+ + |
+
+
+
+ + ++
|
+
+ Adding this attribute to a type causes it to be interpreted as a unit of measure. + This may only be used under very limited conditions. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
|
+
+ The type of machine-sized signed integer numbers, annotated with a unit of measure. + The unit of measure is erased in compiled code and when values of this type + are analyzed using reflection. The type is representationally equivalent to + IntPtr. +
++ Represents an unmanaged pointer in F# code. +
+
+ This type should only be used when writing F# code that interoperates
+ with native code. Use of this type in F# code may result in
+ unverifiable code being generated. Conversions to and from the
+ nativeint type may be required. Values of this type can be generated
+ by the functions in the NativeInterop.NativePtr
module.
+
+ Adding this attribute to a type indicates it is a type where comparison is an abnormal operation. + This means that the type does not satisfy the F# 'comparison' constraint. Within the bounds of the + F# type system, this helps ensure that the F# generic comparison function is not instantiated directly + at this type. The attribute and checking does not constrain the use of comparison with base or child + types of this type. + +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ NoComparisonAttribute()
+ + + + Returns: + NoComparisonAttribute
+
+ NoComparisonAttribute
+ + |
+
+
+
+ + ++
|
+
+ Indicates a value or a function that must not be inlined by the F# compiler, + but may be inlined by the JIT compiler. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ NoCompilerInliningAttribute()
+ + + + Returns: + NoCompilerInliningAttribute
+
+ NoCompilerInliningAttribute
+ + |
+
+
+
+ + ++
|
+
+ This attribute is used to tag values that may not be dynamically invoked at runtime. This is + typically added to inlined functions whose implementations include unverifiable code. It + causes the method body emitted for the inlined function to raise an exception if + dynamically invoked, rather than including the unverifiable code in the generated + assembly. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ NoDynamicInvocationAttribute()
+ + + + Returns: + NoDynamicInvocationAttribute
+
+ NoDynamicInvocationAttribute
+ + |
+
+
+
+ + ++
|
+
+ Adding this attribute to a type indicates it is a type where equality is an abnormal operation. + This means that the type does not satisfy the F# 'equality' constraint. Within the bounds of the + F# type system, this helps ensure that the F# generic equality function is not instantiated directly + at this type. The attribute and checking does not constrain the use of comparison with base or child + types of this type. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ NoEqualityAttribute()
+ + + + Returns: + NoEqualityAttribute
+
+ NoEqualityAttribute
+ + |
+
+
+
+ + ++
|
+
+ + Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' + +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ FromInt32 value
+ + + Parameters: +
int32
+
+ + + + Returns: + 'T
+
+ + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ FromInt64 value
+ + + Parameters: +
int64
+
+ + + + Returns: + 'T
+
+ + |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ FromOne ()
+ + + Parameters: +
unit
+
+ + + + Returns: + 'T
+
+ + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ FromString text
+ + + Parameters: +
string
+
+ + + + Returns: + 'T
+
+ + |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ FromZero ()
+ + + Parameters: +
unit
+
+ + + + Returns: + 'T
+
+ + |
+ + + | +
+ Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' +
++ Modules + | ++ Description + | +
+ + + + NumericLiteralI + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' + + + |
+
+ An abbreviation for the CLI type Object. +
++ Contains extension methods to allow the use of F# indexer notation with arrays. + This module is automatically opened in all F# code. +
++ Type extension + | ++ Description + | +
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Get the index for the element offset elements away from the end of the collection. + + |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Get the index for the element offset elements away from the end of the collection. + + |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Get the index for the element offset elements away from the end of the collection. + + |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Get the index for the element offset elements away from the end of the collection. + + |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Get the index for the element offset elements away from the end of the collection. + + |
+
+ This module contains the basic arithmetic operations with overflow checks. +
++ Function or value + | ++ Description + | +
+ + | +
+
+
+ + ++
|
+
+ + | +
+
+
+ + ++
|
+
+ + | +
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ~-value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + ^T
+
+ The negated value.
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ byte value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + byte
+
+ The converted byte
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Converts the argument to |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ char value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + char
+
+ The converted char
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Converts the argument to |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ int value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + int
+
+ The converted int
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Converts the argument to |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ int16 value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + int16
+
+ The converted int16
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Converts the argument to |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ int32 value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + int32
+
+ The converted int32
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Converts the argument to |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ int64 value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + int64
+
+ The converted int64
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Converts the argument to |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ nativeint value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + nativeint
+
+ The converted nativeint
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ sbyte value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + sbyte
+
+ The converted sbyte
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Converts the argument to |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ uint16 value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + uint16
+
+ The converted uint16
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Converts the argument to |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ uint32 value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + uint32
+
+ The converted uint32
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Converts the argument to |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ uint64 value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + uint64
+
+ The converted uint64
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Converts the argument to |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ unativeint value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + unativeint
+
+ The converted unativeint
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Converts the argument to |
+
+ A module of comparison and equality operators that are statically resolved, but which are not fully generic and do not make structural comparison. Opening this + module may make code that relies on structural or generic comparison no longer compile. +
++ Function or value + | ++ Description + | +
+ + | ++ + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ x <= y
+ + + Parameters: +
^T
+ -
+ The first parameter.
+
+ + + + y + + : + ^U
+ -
+ The second parameter.
+
+ + + + Returns: + bool
+
+ The result of the comparison.
+ + Modifiers: + inline + + Type parameters: + ^T, ^U + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ x <> y
+ + + Parameters: +
^T
+ -
+ The first parameter.
+
+ + + + y + + : + ^T
+ -
+ The second parameter.
+
+ + + + Returns: + bool
+
+ The result of the comparison.
+ + Modifiers: + inline + + Type parameters: + ^T + |
+ + + | +
+ + | ++ + | +
+ + | ++ + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ x >= y
+ + + Parameters: +
^T
+ -
+ The first parameter.
+
+ + + + y + + : + ^U
+ -
+ The second parameter.
+
+ + + + Returns: + bool
+
+ The result of the comparison.
+ + Modifiers: + inline + + Type parameters: + ^T, ^U + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ compare e1 e2
+ + + Parameters: +
^T
+ -
+ The first value.
+
+ + + + e2 + + : + ^T
+ -
+ The second value.
+
+ + + + Returns: + int
+
+ The result of the comparison.
+ + Modifiers: + inline + + Type parameters: + ^T + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ hash value
+ + + Parameters: +
'T
+ -
+ The value.
+
+ + + + Returns: + int
+
+ The hash code.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ max e1 e2
+ + + Parameters: +
^T
+ -
+ The first value.
+
+ + + + e2 + + : + ^T
+ -
+ The second value.
+
+ + + + Returns: + ^T
+
+ The maximum value.
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ min e1 e2
+ + + Parameters: +
^T
+ -
+ The first value.
+
+ + + + e2 + + : + ^T
+ -
+ The second value.
+
+ + + + Returns: + ^T
+
+ The minimum value.
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+ + ++
|
+
+ A module of compiler intrinsic functions for efficient implementations of F# integer ranges + and dynamic invocations of other F# operators +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ AbsDynamic x
+ + + Parameters: +
'T
+
+ + + + Returns: + 'T
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ AcosDynamic x
+ + + Parameters: +
'T
+
+ + + + Returns: + 'T
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ AsinDynamic x
+ + + Parameters: +
'T
+
+ + + + Returns: + 'T
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Atan2Dynamic y x
+ + + Parameters: +
'T1
+
+ + + + x + + : + 'T1
+
+ + + + Returns: + 'T2
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ AtanDynamic x
+ + + Parameters: +
'T
+
+ + + + Returns: + 'T
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ CeilingDynamic x
+ + + Parameters: +
'T
+
+ + + + Returns: + 'T
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ CosDynamic x
+ + + Parameters: +
'T
+
+ + + + Returns: + 'T
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ CoshDynamic x
+ + + Parameters: +
'T
+
+ + + + Returns: + 'T
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ExpDynamic x
+ + + Parameters: +
'T
+
+ + + + Returns: + 'T
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ FloorDynamic x
+ + + Parameters: +
'T
+
+ + + + Returns: + 'T
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GetArraySlice source start finish
+ + + Parameters: +
'T[]
+ -
+ The input array.
+
+ + + + start + + : + int option
+ -
+ The start index.
+
+ + + + finish + + : + int option
+ -
+ The end index.
+
+ + + + Returns: + 'T[]
+
+ The sub array from the input indices.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ GetArraySlice2D source start1 finish1 start2 finish2
+ + + Parameters: +
'T[,]
+ -
+ The source array.
+
+ + + + start1 + + : + int option
+ -
+ The start index of the first dimension.
+
+ + + + finish1 + + : + int option
+ -
+ The end index of the first dimension.
+
+ + + + start2 + + : + int option
+ -
+ The start index of the second dimension.
+
+ + + + finish2 + + : + int option
+ -
+ The end index of the second dimension.
+
+ + + + Returns: + 'T[,]
+
+ The two dimensional sub array from the input indices.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GetArraySlice2DFixed1 source index1 start2 finish2
+ + + Parameters: +
'T[,]
+ -
+ The source array.
+
+ + + + index1 + + : + int
+ -
+ The index of the first dimension.
+
+ + + + start2 + + : + int option
+ -
+ The start index of the second dimension.
+
+ + + + finish2 + + : + int option
+ -
+ The end index of the second dimension.
+
+ + + + Returns: + 'T[]
+
+ The sub array from the input indices.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Gets a vector slice of a 2D array. The index of the first dimension is fixed. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GetArraySlice2DFixed2 source start1 finish1 index2
+ + + Parameters: +
'T[,]
+ -
+ The source array.
+
+ + + + start1 + + : + int option
+ -
+ The start index of the first dimension.
+
+ + + + finish1 + + : + int option
+ -
+ The end index of the first dimension.
+
+ + + + index2 + + : + int
+ -
+ The fixed index of the second dimension.
+
+ + + + Returns: + 'T[]
+
+ The sub array from the input indices.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Gets a vector slice of a 2D array. The index of the second dimension is fixed. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GetArraySlice3D source start1 finish1 start2 finish2 start3 finish3
+ + + Parameters: +
'T[,,]
+ -
+ The source array.
+
+ + + + start1 + + : + int option
+ -
+ The start index of the first dimension.
+
+ + + + finish1 + + : + int option
+ -
+ The end index of the first dimension.
+
+ + + + start2 + + : + int option
+ -
+ The start index of the second dimension.
+
+ + + + finish2 + + : + int option
+ -
+ The end index of the second dimension.
+
+ + + + start3 + + : + int option
+ -
+ The start index of the third dimension.
+
+ + + + finish3 + + : + int option
+ -
+ The end index of the third dimension.
+
+ + + + Returns: + 'T[,,]
+
+ The three dimensional sub array from the given indices.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GetArraySlice3DFixedDouble1 source index1 index2 start3 finish3
+ + + Parameters: +
'T[,,]
+ -
+ The source array.
+
+ + + + index1 + + : + int
+ -
+ The fixed index of the first dimension.
+
+ + + + index2 + + : + int
+ -
+ The fixed index of the second dimension.
+
+ + + + start3 + + : + int option
+ -
+ The start index of the third dimension.
+
+ + + + finish3 + + : + int option
+ -
+ The end index of the third dimension.
+
+ + + + Returns: + 'T[]
+
+ The one dimensional sub array from the given indices.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GetArraySlice3DFixedDouble2 source index1 start2 finish2 index3
+ + + Parameters: +
'T[,,]
+ -
+ The source array.
+
+ + + + index1 + + : + int
+ -
+ The fixed index of the first dimension.
+
+ + + + start2 + + : + int option
+ -
+ The start index of the second dimension.
+
+ + + + finish2 + + : + int option
+ -
+ The end index of the second dimension.
+
+ + + + index3 + + : + int
+ -
+ The fixed index of the third dimension.
+
+ + + + Returns: + 'T[]
+
+ The one dimensional sub array from the given indices.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GetArraySlice3DFixedDouble3 source start1 finish1 index2 index3
+ + + Parameters: +
'T[,,]
+ -
+ The source array.
+
+ + + + start1 + + : + int option
+ -
+ The start index of the first dimension.
+
+ + + + finish1 + + : + int option
+ -
+ The end index of the first dimension.
+
+ + + + index2 + + : + int
+ -
+ The fixed index of the second dimension.
+
+ + + + index3 + + : + int
+ -
+ The fixed index of the third dimension.
+
+ + + + Returns: + 'T[]
+
+ The one dimensional sub array from the given indices.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GetArraySlice3DFixedSingle1 source index1 start2 finish2 start3 finish3
+ + + Parameters: +
'T[,,]
+ -
+ The source array.
+
+ + + + index1 + + : + int
+ -
+ The fixed index of the first dimension.
+
+ + + + start2 + + : + int option
+ -
+ The start index of the second dimension.
+
+ + + + finish2 + + : + int option
+ -
+ The end index of the second dimension.
+
+ + + + start3 + + : + int option
+ -
+ The start index of the third dimension.
+
+ + + + finish3 + + : + int option
+ -
+ The end index of the third dimension.
+
+ + + + Returns: + 'T[,]
+
+ The two dimensional sub array from the given indices.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GetArraySlice3DFixedSingle2 source start1 finish1 index2 start3 finish3
+ + + Parameters: +
'T[,,]
+ -
+ The source array.
+
+ + + + start1 + + : + int option
+ -
+ The start index of the first dimension.
+
+ + + + finish1 + + : + int option
+ -
+ The end index of the first dimension.
+
+ + + + index2 + + : + int
+ -
+ The fixed index of the second dimension.
+
+ + + + start3 + + : + int option
+ -
+ The start index of the third dimension.
+
+ + + + finish3 + + : + int option
+ -
+ The end index of the third dimension.
+
+ + + + Returns: + 'T[,]
+
+ The two dimensional sub array from the given indices.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GetArraySlice3DFixedSingle3 source start1 finish1 start2 finish2 index3
+ + + Parameters: +
'T[,,]
+ -
+ The source array.
+
+ + + + start1 + + : + int option
+ -
+ The start index of the first dimension.
+
+ + + + finish1 + + : + int option
+ -
+ The end index of the first dimension.
+
+ + + + start2 + + : + int option
+ -
+ The start index of the second dimension.
+
+ + + + finish2 + + : + int option
+ -
+ The end index of the second dimension.
+
+ + + + index3 + + : + int
+ -
+ The fixed index of the third dimension.
+
+ + + + Returns: + 'T[,]
+
+ The two dimensional sub array from the given indices.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GetArraySlice4D source start1 finish1 start2 finish2 start3 finish3 start4 finish4
+ + + Parameters: +
'T[,,,]
+ -
+ The source array.
+
+ + + + start1 + + : + int option
+ -
+ The start index of the first dimension.
+
+ + + + finish1 + + : + int option
+ -
+ The end index of the first dimension.
+
+ + + + start2 + + : + int option
+ -
+ The start index of the second dimension.
+
+ + + + finish2 + + : + int option
+ -
+ The end index of the second dimension.
+
+ + + + start3 + + : + int option
+ -
+ The start index of the third dimension.
+
+ + + + finish3 + + : + int option
+ -
+ The end index of the third dimension.
+
+ + + + start4 + + : + int option
+ -
+ The start index of the fourth dimension.
+
+ + + + finish4 + + : + int option
+ -
+ The end index of the fourth dimension.
+
+ + + + Returns: + 'T[,,,]
+
+ The four dimensional sub array from the given indices.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GetArraySlice4DFixedDouble1 source index1 index2 start3 finish3 start4 finish4
+ + + Parameters: +
'T[,,,]
+ -
+ The source array.
+
+ + + + index1 + + : + int
+ -
+ The fixed index of the first dimension.
+
+ + + + index2 + + : + int
+ -
+ The fixed index of the second dimension.
+
+ + + + start3 + + : + int option
+ -
+ The start index of the third dimension.
+
+ + + + finish3 + + : + int option
+ -
+ The end index of the third dimension.
+
+ + + + start4 + + : + int option
+ -
+ The start index of the fourth dimension.
+
+ + + + finish4 + + : + int option
+ -
+ The end index of the fourth dimension.
+
+ + + + Returns: + 'T[,]
+
+ The two dimensional sub array from the given indices.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GetArraySlice4DFixedDouble2 source index1 start2 finish2 index3 start4 finish4
+ + + Parameters: +
'T[,,,]
+ -
+ The source array.
+
+ + + + index1 + + : + int
+ -
+ The fixed index of the first dimension.
+
+ + + + start2 + + : + int option
+ -
+ The start index of the second dimension.
+
+ + + + finish2 + + : + int option
+ -
+ The end index of the second dimension.
+
+ + + + index3 + + : + int
+ -
+ The fixed index of the third dimension.
+
+ + + + start4 + + : + int option
+ -
+ The start index of the fourth dimension.
+
+ + + + finish4 + + : + int option
+ -
+ The end index of the fourth dimension.
+
+ + + + Returns: + 'T[,]
+
+ The two dimensional sub array from the given indices.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GetArraySlice4DFixedDouble3 source index1 start2 finish2 start3 finish3 index4
+ + + Parameters: +
'T[,,,]
+ -
+ The source array.
+
+ + + + index1 + + : + int
+ -
+ The fixed index of the first dimension.
+
+ + + + start2 + + : + int option
+ -
+ The start index of the second dimension.
+
+ + + + finish2 + + : + int option
+ -
+ The end index of the second dimension.
+
+ + + + start3 + + : + int option
+ -
+ The start index of the third dimension.
+
+ + + + finish3 + + : + int option
+ -
+ The end index of the third dimension.
+
+ + + + index4 + + : + int
+ -
+ The fixed index of the fourth dimension.
+
+ + + + Returns: + 'T[,]
+
+ The two dimensional sub array from the given indices.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GetArraySlice4DFixedDouble4 source start1 finish1 index2 index3 start4 finish4
+ + + Parameters: +
'T[,,,]
+ -
+ The source array.
+
+ + + + start1 + + : + int option
+ -
+ The start index of the first dimension.
+
+ + + + finish1 + + : + int option
+ -
+ The end index of the first dimension.
+
+ + + + index2 + + : + int
+ -
+ The fixed index of the second dimension.
+
+ + + + index3 + + : + int
+ -
+ The fixed index of the third dimension.
+
+ + + + start4 + + : + int option
+ -
+ The start index of the fourth dimension.
+
+ + + + finish4 + + : + int option
+ -
+ The end index of the fourth dimension.
+
+ + + + Returns: + 'T[,]
+
+ The two dimensional sub array from the given indices.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GetArraySlice4DFixedDouble5 source start1 finish1 index2 start3 finish3 index4
+ + + Parameters: +
'T[,,,]
+ -
+ The source array.
+
+ + + + start1 + + : + int option
+ -
+ The start index of the first dimension.
+
+ + + + finish1 + + : + int option
+ -
+ The end index of the first dimension.
+
+ + + + index2 + + : + int
+ -
+ The fixed index of the second dimension.
+
+ + + + start3 + + : + int option
+ -
+ The start index of the third dimension.
+
+ + + + finish3 + + : + int option
+ -
+ The end index of the third dimension.
+
+ + + + index4 + + : + int
+ -
+ The fixed index of the fourth dimension.
+
+ + + + Returns: + 'T[,]
+
+ The two dimensional sub array from the given indices.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GetArraySlice4DFixedDouble6 source start1 finish1 start2 finish2 index3 index4
+ + + Parameters: +
'T[,,,]
+ -
+ The source array.
+
+ + + + start1 + + : + int option
+ -
+ The start index of the first dimension.
+
+ + + + finish1 + + : + int option
+ -
+ The end index of the first dimension.
+
+ + + + start2 + + : + int option
+ -
+ The start index of the second dimension.
+
+ + + + finish2 + + : + int option
+ -
+ The end index of the second dimension.
+
+ + + + index3 + + : + int
+ -
+ The fixed index of the third dimension.
+
+ + + + index4 + + : + int
+ -
+ The fixed index of the fourth dimension.
+
+ + + + Returns: + 'T[,]
+
+ The two dimensional sub array from the given indices.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GetArraySlice4DFixedSingle1 source index1 start2 finish2 start3 finish3 start4 finish4
+ + + Parameters: +
'T[,,,]
+ -
+ The source array.
+
+ + + + index1 + + : + int
+ -
+ The fixed index of the first dimension.
+
+ + + + start2 + + : + int option
+ -
+ The start index of the second dimension.
+
+ + + + finish2 + + : + int option
+ -
+ The end index of the second dimension.
+
+ + + + start3 + + : + int option
+ -
+ The start index of the third dimension.
+
+ + + + finish3 + + : + int option
+ -
+ The end index of the third dimension.
+
+ + + + start4 + + : + int option
+ -
+ The start index of the fourth dimension.
+
+ + + + finish4 + + : + int option
+ -
+ The end index of the fourth dimension.
+
+ + + + Returns: + 'T[,,]
+
+ The three dimensional sub array from the given indices.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GetArraySlice4DFixedSingle2 source start1 finish1 index2 start3 finish3 start4 finish4
+ + + Parameters: +
'T[,,,]
+ -
+ The source array.
+
+ + + + start1 + + : + int option
+ -
+ The start index of the first dimension.
+
+ + + + finish1 + + : + int option
+ -
+ The end index of the first dimension.
+
+ + + + index2 + + : + int
+ -
+ The fixed index of the second dimension.
+
+ + + + start3 + + : + int option
+ -
+ The start index of the third dimension.
+
+ + + + finish3 + + : + int option
+ -
+ The end index of the third dimension.
+
+ + + + start4 + + : + int option
+ -
+ The start index of the fourth dimension.
+
+ + + + finish4 + + : + int option
+ -
+ The end index of the fourth dimension.
+
+ + + + Returns: + 'T[,,]
+
+ The three dimensional sub array from the given indices.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GetArraySlice4DFixedSingle3 source start1 finish1 start2 finish2 index3 start4 finish4
+ + + Parameters: +
'T[,,,]
+ -
+ The source array.
+
+ + + + start1 + + : + int option
+ -
+ The start index of the first dimension.
+
+ + + + finish1 + + : + int option
+ -
+ The end index of the first dimension.
+
+ + + + start2 + + : + int option
+ -
+ The start index of the second dimension.
+
+ + + + finish2 + + : + int option
+ -
+ The end index of the second dimension.
+
+ + + + index3 + + : + int
+ -
+ The fixed index of the third dimension.
+
+ + + + start4 + + : + int option
+ -
+ The start index of the fourth dimension.
+
+ + + + finish4 + + : + int option
+ -
+ The end index of the fourth dimension.
+
+ + + + Returns: + 'T[,,]
+
+ The three dimensional sub array from the given indices.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GetArraySlice4DFixedSingle4 source start1 finish1 start2 finish2 start3 finish3 index4
+ + + Parameters: +
'T[,,,]
+ -
+ The source array.
+
+ + + + start1 + + : + int option
+ -
+ The start index of the first dimension.
+
+ + + + finish1 + + : + int option
+ -
+ The end index of the first dimension.
+
+ + + + start2 + + : + int option
+ -
+ The start index of the second dimension.
+
+ + + + finish2 + + : + int option
+ -
+ The end index of the second dimension.
+
+ + + + start3 + + : + int option
+ -
+ The start index of the third dimension.
+
+ + + + finish3 + + : + int option
+ -
+ The end index of the third dimension.
+
+ + + + index4 + + : + int
+ -
+ The fixed index of the fourth dimension.
+
+ + + + Returns: + 'T[,,]
+
+ The three dimensional sub array from the given indices.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GetArraySlice4DFixedTriple1 source start1 finish1 index2 index3 index4
+ + + Parameters: +
'T[,,,]
+ -
+ The source array.
+
+ + + + start1 + + : + int option
+ -
+ The start index of the first dimension.
+
+ + + + finish1 + + : + int option
+ -
+ The end index of the first dimension.
+
+ + + + index2 + + : + int
+ -
+ The fixed index of the second dimension.
+
+ + + + index3 + + : + int
+ -
+ The fixed index of the third dimension.
+
+ + + + index4 + + : + int
+ -
+ The fixed index of the fourth dimension.
+
+ + + + Returns: + 'T[]
+
+ The one dimensional sub array from the given indices.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GetArraySlice4DFixedTriple2 source index1 start2 finish2 index3 index4
+ + + Parameters: +
'T[,,,]
+ -
+ The source array.
+
+ + + + index1 + + : + int
+ -
+ The fixed index of the first dimension.
+
+ + + + start2 + + : + int option
+ -
+ The start index of the second dimension.
+
+ + + + finish2 + + : + int option
+ -
+ The end index of the second dimension.
+
+ + + + index3 + + : + int
+ -
+ The fixed index of the third dimension.
+
+ + + + index4 + + : + int
+ -
+ The fixed index of the fourth dimension.
+
+ + + + Returns: + 'T[]
+
+ The one dimensional sub array from the given indices.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GetArraySlice4DFixedTriple3 source index1 index2 start3 finish3 index4
+ + + Parameters: +
'T[,,,]
+ -
+ The source array.
+
+ + + + index1 + + : + int
+ -
+ The fixed index of the first dimension.
+
+ + + + index2 + + : + int
+ -
+ The fixed index of the second dimension.
+
+ + + + start3 + + : + int option
+ -
+ The start index of the third dimension.
+
+ + + + finish3 + + : + int option
+ -
+ The end index of the third dimension.
+
+ + + + index4 + + : + int
+ -
+ The fixed index of the fourth dimension.
+
+ + + + Returns: + 'T[]
+
+ The one dimensional sub array from the given indices.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GetArraySlice4DFixedTriple4 source index1 index2 index3 start4 finish4
+ + + Parameters: +
'T[,,,]
+ -
+ The source array.
+
+ + + + index1 + + : + int
+ -
+ The fixed index of the first dimension.
+
+ + + + index2 + + : + int
+ -
+ The fixed index of the second dimension.
+
+ + + + index3 + + : + int
+ -
+ The fixed index of the third dimension.
+
+ + + + start4 + + : + int option
+ -
+ The start index of the fourth dimension.
+
+ + + + finish4 + + : + int option
+ -
+ The end index of the fourth dimension.
+
+ + + + Returns: + 'T[]
+
+ The one dimensional sub array from the given indices.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ GetStringSlice source start finish
+ + + Parameters: +
string
+ -
+ The source string.
+
+ + + + start + + : + int option
+ -
+ The index of the first character of the slice.
+
+ + + + finish + + : + int option
+ -
+ The index of the last character of the slice.
+
+ + + + Returns: + string
+
+ The substring from the given indices.
+ + Modifiers: + inline + + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Log10Dynamic x
+ + + Parameters: +
'T
+
+ + + + Returns: + 'T
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ LogDynamic x
+ + + Parameters: +
'T
+
+ + + + Returns: + 'T
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + |
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ PowDynamic x y
+ + + Parameters: +
'T
+
+ + + + y + + : + 'U
+
+ + + + Returns: + 'T
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ PowGeneric (one, mul, value, exponent)
+ + + Parameters: +
'T
+
+ + + + mul + + : + 'T -> 'T -> 'T
+
+ + + + value + + : + 'T
+
+ + + + exponent + + : + int
+
+ + + + Returns: + 'T
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator + + |
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ PowUIntPtr x n
+ + + Parameters: +
unativeint
+
+ + + + n + + : + int
+
+ + + + Returns: + unativeint
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + This is a library intrinsic. Calls to this function may be generated by uses of the generic 'pown' operator on values of type 'unativeint' + + |
+
+ + | ++ + | +
+ + | ++ + | +
+ + | ++ + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ RangeGeneric one add start stop
+ + + Parameters: +
'T
+
+ + + + add + + : + 'T -> 'T -> 'T
+
+ + + + start + + : + 'T
+
+ + + + stop + + : + 'T
+
+ + + + Returns: + 'T seq
+
+ + |
+ + + | +
+ + | ++ + | +
+ + | ++ + | +
+ + | ++ + | +
+ + | ++ + | +
+ + | ++ + | +
+ + | ++ + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ RangeStepGeneric zero add start step stop
+ + + Parameters: +
'Step
+
+ + + + add + + : + 'T -> 'Step -> 'T
+
+ + + + start + + : + 'T
+
+ + + + step + + : + 'Step
+
+ + + + stop + + : + 'T
+
+ + + + Returns: + 'T seq
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Generate a range of values using the given zero, add, start, step and stop values + + |
+
+ + | ++ + | +
+ + | ++ + | +
+ + | ++ + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ RangeUIntPtr start step stop
+ + + Parameters: +
unativeint
+
+ + + + step + + : + unativeint
+
+ + + + stop + + : + unativeint
+
+ + + + Returns: + unativeint seq
+
+ + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ RoundDynamic x
+ + + Parameters: +
'T
+
+ + + + Returns: + 'T
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ SetArraySlice target start finish source
+ + + Parameters: +
'T[]
+ -
+ The target array.
+
+ + + + start + + : + int option
+ -
+ The start index.
+
+ + + + finish + + : + int option
+ -
+ The end index.
+
+ + + + source + + : + 'T[]
+ -
+ The source array.
+
+ + + Modifiers: + inline + + Type parameters: + 'T + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ SetArraySlice2D target start1 finish1 start2 finish2 source
+ + + Parameters: +
'T[,]
+ -
+ The target array.
+
+ + + + start1 + + : + int option
+ -
+ The start index of the first dimension.
+
+ + + + finish1 + + : + int option
+ -
+ The end index of the first dimension.
+
+ + + + start2 + + : + int option
+ -
+ The start index of the second dimension.
+
+ + + + finish2 + + : + int option
+ -
+ The end index of the second dimension.
+
+ + + + source + + : + 'T[,]
+ -
+ The source array.
+
+ + + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ SetArraySlice2DFixed1 target index1 start2 finish2 source
+ + + Parameters: +
'T[,]
+ -
+ The target array.
+
+ + + + index1 + + : + int
+ -
+ The index of the first dimension.
+
+ + + + start2 + + : + int option
+ -
+ The start index of the second dimension.
+
+ + + + finish2 + + : + int option
+ -
+ The end index of the second dimension.
+
+ + + + source + + : + 'T[]
+ -
+ The source array.
+
+ + + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Sets a vector slice of a 2D array. The index of the first dimension is fixed. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ SetArraySlice2DFixed2 target start1 finish1 index2 source
+ + + Parameters: +
'T[,]
+ -
+ The target array.
+
+ + + + start1 + + : + int option
+ -
+ The start index of the first dimension.
+
+ + + + finish1 + + : + int option
+ -
+ The end index of the first dimension.
+
+ + + + index2 + + : + int
+ -
+ The index of the second dimension.
+
+ + + + source + + : + 'T[]
+ -
+ The source array.
+
+ + + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Sets a vector slice of a 2D array. The index of the second dimension is fixed. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ SetArraySlice3D target start1 finish1 start2 finish2 start3 finish3 source
+ + + Parameters: +
'T[,,]
+ -
+ The target array.
+
+ + + + start1 + + : + int option
+ -
+ The start index of the first dimension.
+
+ + + + finish1 + + : + int option
+ -
+ The end index of the first dimension.
+
+ + + + start2 + + : + int option
+ -
+ The start index of the second dimension.
+
+ + + + finish2 + + : + int option
+ -
+ The end index of the second dimension.
+
+ + + + start3 + + : + int option
+ -
+ The start index of the third dimension.
+
+ + + + finish3 + + : + int option
+ -
+ The end index of the third dimension.
+
+ + + + source + + : + 'T[,,]
+ -
+ The source array.
+
+ + + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ SetArraySlice3DFixedDouble1 target index1 index2 start3 finish3 source
+ + + Parameters: +
'T[,,]
+ -
+ The target array.
+
+ + + + index1 + + : + int
+ -
+ The fixed index of the first dimension.
+
+ + + + index2 + + : + int
+ -
+ The fixed index of the second dimension.
+
+ + + + start3 + + : + int option
+ -
+ The start index of the third dimension.
+
+ + + + finish3 + + : + int option
+ -
+ The end index of the third dimension.
+
+ + + + source + + : + 'T[]
+ -
+ The source array.
+
+ + + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ SetArraySlice3DFixedDouble2 target index1 start2 finish2 index3 source
+ + + Parameters: +
'T[,,]
+ -
+ The target array.
+
+ + + + index1 + + : + int
+ -
+ The fixed index of the first dimension.
+
+ + + + start2 + + : + int option
+ -
+ The start index of the second dimension.
+
+ + + + finish2 + + : + int option
+ -
+ The end index of the second dimension.
+
+ + + + index3 + + : + int
+ -
+ The fixed index of the third dimension.
+
+ + + + source + + : + 'T[]
+ -
+ The source array.
+
+ + + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ SetArraySlice3DFixedDouble3 target start1 finish1 index2 index3 source
+ + + Parameters: +
'T[,,]
+ -
+ The target array.
+
+ + + + start1 + + : + int option
+ -
+ The start index of the first dimension.
+
+ + + + finish1 + + : + int option
+ -
+ The end index of the first dimension.
+
+ + + + index2 + + : + int
+ -
+ The fixed index of the second dimension.
+
+ + + + index3 + + : + int
+ -
+ The fixed index of the third dimension.
+
+ + + + source + + : + 'T[]
+ -
+ The source array.
+
+ + + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ SetArraySlice3DFixedSingle1 target index1 start2 finish2 start3 finish3 source
+ + + Parameters: +
'T[,,]
+ -
+ The target array.
+
+ + + + index1 + + : + int
+ -
+ The fixed index of the first dimension.
+
+ + + + start2 + + : + int option
+ -
+ The start index of the second dimension.
+
+ + + + finish2 + + : + int option
+ -
+ The end index of the second dimension.
+
+ + + + start3 + + : + int option
+ -
+ The start index of the third dimension.
+
+ + + + finish3 + + : + int option
+ -
+ The end index of the third dimension.
+
+ + + + source + + : + 'T[,]
+ -
+ The source array.
+
+ + + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ SetArraySlice3DFixedSingle2 target start1 finish1 index2 start3 finish3 source
+ + + Parameters: +
'T[,,]
+ -
+ The target array.
+
+ + + + start1 + + : + int option
+ -
+ The start index of the first dimension.
+
+ + + + finish1 + + : + int option
+ -
+ The end index of the first dimension.
+
+ + + + index2 + + : + int
+ -
+ The fixed index of the second dimension.
+
+ + + + start3 + + : + int option
+ -
+ The start index of the third dimension.
+
+ + + + finish3 + + : + int option
+ -
+ The end index of the third dimension.
+
+ + + + source + + : + 'T[,]
+ -
+ The source array.
+
+ + + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ SetArraySlice3DFixedSingle3 target start1 finish1 start2 finish2 index3 source
+ + + Parameters: +
'T[,,]
+ -
+ The target array.
+
+ + + + start1 + + : + int option
+ -
+ The start index of the first dimension.
+
+ + + + finish1 + + : + int option
+ -
+ The end index of the first dimension.
+
+ + + + start2 + + : + int option
+ -
+ The start index of the second dimension.
+
+ + + + finish2 + + : + int option
+ -
+ The end index of the second dimension.
+
+ + + + index3 + + : + int
+ -
+ The fixed index of the third dimension.
+
+ + + + source + + : + 'T[,]
+ -
+ The source array.
+
+ + + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ SetArraySlice4D target start1 finish1 start2 finish2 start3 finish3 start4 finish4 source
+ + + Parameters: +
'T[,,,]
+ -
+ The target array.
+
+ + + + start1 + + : + int option
+ -
+ The start index of the first dimension.
+
+ + + + finish1 + + : + int option
+ -
+ The end index of the first dimension.
+
+ + + + start2 + + : + int option
+ -
+ The start index of the second dimension.
+
+ + + + finish2 + + : + int option
+ -
+ The end index of the second dimension.
+
+ + + + start3 + + : + int option
+ -
+ The start index of the third dimension.
+
+ + + + finish3 + + : + int option
+ -
+ The end index of the third dimension.
+
+ + + + start4 + + : + int option
+ -
+ The start index of the fourth dimension.
+
+ + + + finish4 + + : + int option
+ -
+ The end index of the fourth dimension.
+
+ + + + source + + : + 'T[,,,]
+ -
+ The source array.
+
+ + + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ SetArraySlice4DFixedDouble1 target index1 index2 start3 finish3 start4 finish4 source
+ + + Parameters: +
'T[,,,]
+ -
+ The target array.
+
+ + + + index1 + + : + int
+ -
+ The fixed index of the first dimension.
+
+ + + + index2 + + : + int
+ -
+ The fixed index of the second dimension.
+
+ + + + start3 + + : + int option
+ -
+ The start index of the third dimension.
+
+ + + + finish3 + + : + int option
+ -
+ The end index of the third dimension.
+
+ + + + start4 + + : + int option
+ -
+ The start index of the fourth dimension.
+
+ + + + finish4 + + : + int option
+ -
+ The end index of the fourth dimension.
+
+ + + + source + + : + 'T[,]
+ -
+ The source array.
+
+ + + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ SetArraySlice4DFixedDouble2 target index1 start2 finish2 index3 start4 finish4 source
+ + + Parameters: +
'T[,,,]
+ -
+ The target array.
+
+ + + + index1 + + : + int
+ -
+ The fixed index of the first dimension.
+
+ + + + start2 + + : + int option
+ -
+ The start index of the second dimension.
+
+ + + + finish2 + + : + int option
+ -
+ The end index of the second dimension.
+
+ + + + index3 + + : + int
+ -
+ The fixed index of the third dimension.
+
+ + + + start4 + + : + int option
+ -
+ The start index of the fourth dimension.
+
+ + + + finish4 + + : + int option
+ -
+ The end index of the fourth dimension.
+
+ + + + source + + : + 'T[,]
+ -
+ The source array.
+
+ + + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ SetArraySlice4DFixedDouble3 target index1 start2 finish2 start3 finish3 index4 source
+ + + Parameters: +
'T[,,,]
+ -
+ The target array.
+
+ + + + index1 + + : + int
+ -
+ The fixed index of the first dimension.
+
+ + + + start2 + + : + int option
+ -
+ The start index of the second dimension.
+
+ + + + finish2 + + : + int option
+ -
+ The end index of the second dimension.
+
+ + + + start3 + + : + int option
+ -
+ The start index of the third dimension.
+
+ + + + finish3 + + : + int option
+ -
+ The end index of the third dimension.
+
+ + + + index4 + + : + int
+ -
+ The fixed index of the fourth dimension.
+
+ + + + source + + : + 'T[,]
+ -
+ The source array.
+
+ + + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ SetArraySlice4DFixedDouble4 target start1 finish1 index2 index3 start4 finish4 source
+ + + Parameters: +
'T[,,,]
+ -
+ The target array.
+
+ + + + start1 + + : + int option
+ -
+ The start index of the first dimension.
+
+ + + + finish1 + + : + int option
+ -
+ The end index of the first dimension.
+
+ + + + index2 + + : + int
+ -
+ The fixed index of the second dimension.
+
+ + + + index3 + + : + int
+ -
+ The fixed index of the third dimension.
+
+ + + + start4 + + : + int option
+ -
+ The start index of the fourth dimension.
+
+ + + + finish4 + + : + int option
+ -
+ The end index of the fourth dimension.
+
+ + + + source + + : + 'T[,]
+ -
+ The source array.
+
+ + + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ SetArraySlice4DFixedDouble5 target start1 finish1 index2 start3 finish3 index4 source
+ + + Parameters: +
'T[,,,]
+ -
+ The target array.
+
+ + + + start1 + + : + int option
+ -
+ The start index of the first dimension.
+
+ + + + finish1 + + : + int option
+ -
+ The end index of the first dimension.
+
+ + + + index2 + + : + int
+ -
+ The fixed index of the second dimension.
+
+ + + + start3 + + : + int option
+ -
+ The start index of the third dimension.
+
+ + + + finish3 + + : + int option
+ -
+ The end index of the third dimension.
+
+ + + + index4 + + : + int
+ -
+ The fixed index of the fourth dimension.
+
+ + + + source + + : + 'T[,]
+ -
+ The source array.
+
+ + + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ SetArraySlice4DFixedDouble6 target start1 finish1 start2 finish2 index3 index4 source
+ + + Parameters: +
'T[,,,]
+ -
+ The target array.
+
+ + + + start1 + + : + int option
+ -
+ The start index of the first dimension.
+
+ + + + finish1 + + : + int option
+ -
+ The end index of the first dimension.
+
+ + + + start2 + + : + int option
+ -
+ The start index of the second dimension.
+
+ + + + finish2 + + : + int option
+ -
+ The end index of the second dimension.
+
+ + + + index3 + + : + int
+ -
+ The fixed index of the third dimension.
+
+ + + + index4 + + : + int
+ -
+ The fixed index of the fourth dimension.
+
+ + + + source + + : + 'T[,]
+ -
+ The source array.
+
+ + + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ SetArraySlice4DFixedSingle1 target index1 start2 finish2 start3 finish3 start4 finish4 source
+ + + Parameters: +
'T[,,,]
+ -
+ The target array.
+
+ + + + index1 + + : + int
+ -
+ The fixed index of the first dimension.
+
+ + + + start2 + + : + int option
+ -
+ The start index of the second dimension.
+
+ + + + finish2 + + : + int option
+ -
+ The end index of the second dimension.
+
+ + + + start3 + + : + int option
+ -
+ The start index of the third dimension.
+
+ + + + finish3 + + : + int option
+ -
+ The end index of the third dimension.
+
+ + + + start4 + + : + int option
+ -
+ The start index of the fourth dimension.
+
+ + + + finish4 + + : + int option
+ -
+ The end index of the fourth dimension.
+
+ + + + source + + : + 'T[,,]
+ -
+ The source array.
+
+ + + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ SetArraySlice4DFixedSingle2 target start1 finish1 index2 start3 finish3 start4 finish4 source
+ + + Parameters: +
'T[,,,]
+ -
+ The target array.
+
+ + + + start1 + + : + int option
+ -
+ The start index of the first dimension.
+
+ + + + finish1 + + : + int option
+ -
+ The end index of the first dimension.
+
+ + + + index2 + + : + int
+ -
+ The fixed index of the second dimension.
+
+ + + + start3 + + : + int option
+ -
+ The start index of the third dimension.
+
+ + + + finish3 + + : + int option
+ -
+ The end index of the third dimension.
+
+ + + + start4 + + : + int option
+ -
+ The start index of the fourth dimension.
+
+ + + + finish4 + + : + int option
+ -
+ The end index of the fourth dimension.
+
+ + + + source + + : + 'T[,,]
+ -
+ The source array.
+
+ + + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ SetArraySlice4DFixedSingle3 target start1 finish1 start2 finish2 index3 start4 finish4 source
+ + + Parameters: +
'T[,,,]
+ -
+ The target array.
+
+ + + + start1 + + : + int option
+ -
+ The start index of the first dimension.
+
+ + + + finish1 + + : + int option
+ -
+ The end index of the first dimension.
+
+ + + + start2 + + : + int option
+ -
+ The start index of the second dimension.
+
+ + + + finish2 + + : + int option
+ -
+ The end index of the second dimension.
+
+ + + + index3 + + : + int
+ -
+ The fixed index of the third dimension.
+
+ + + + start4 + + : + int option
+ -
+ The start index of the fourth dimension.
+
+ + + + finish4 + + : + int option
+ -
+ The end index of the fourth dimension.
+
+ + + + source + + : + 'T[,,]
+ -
+ The source array.
+
+ + + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ SetArraySlice4DFixedSingle4 target start1 finish1 start2 finish2 start3 finish3 index4 source
+ + + Parameters: +
'T[,,,]
+ -
+ The target array.
+
+ + + + start1 + + : + int option
+ -
+ The start index of the first dimension.
+
+ + + + finish1 + + : + int option
+ -
+ The end index of the first dimension.
+
+ + + + start2 + + : + int option
+ -
+ The start index of the second dimension.
+
+ + + + finish2 + + : + int option
+ -
+ The end index of the second dimension.
+
+ + + + start3 + + : + int option
+ -
+ The start index of the third dimension.
+
+ + + + finish3 + + : + int option
+ -
+ The end index of the third dimension.
+
+ + + + index4 + + : + int
+ -
+ The fixed index of the fourth dimension.
+
+ + + + source + + : + 'T[,,]
+ -
+ The source array.
+
+ + + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ SetArraySlice4DFixedTriple1 target start1 finish1 index2 index3 index4 source
+ + + Parameters: +
'T[,,,]
+ -
+ The target array.
+
+ + + + start1 + + : + int option
+ -
+ The start index of the first dimension.
+
+ + + + finish1 + + : + int option
+ -
+ The end index of the first dimension.
+
+ + + + index2 + + : + int
+ -
+ The fixed index of the second dimension.
+
+ + + + index3 + + : + int
+ -
+ The fixed index of the third dimension.
+
+ + + + index4 + + : + int
+ -
+ The fixed index of the fourth dimension.
+
+ + + + source + + : + 'T[]
+ -
+ The source array.
+
+ + + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ SetArraySlice4DFixedTriple2 target index1 start2 finish2 index3 index4 source
+ + + Parameters: +
'T[,,,]
+ -
+ The target array.
+
+ + + + index1 + + : + int
+ -
+ The fixed index of the first dimension.
+
+ + + + start2 + + : + int option
+ -
+ The start index of the second dimension.
+
+ + + + finish2 + + : + int option
+ -
+ The end index of the second dimension.
+
+ + + + index3 + + : + int
+ -
+ The fixed index of the third dimension.
+
+ + + + index4 + + : + int
+ -
+ The fixed index of the fourth dimension.
+
+ + + + source + + : + 'T[]
+ -
+ The source array.
+
+ + + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ SetArraySlice4DFixedTriple3 target index1 index2 start3 finish3 index4 source
+ + + Parameters: +
'T[,,,]
+ -
+ The target array.
+
+ + + + index1 + + : + int
+ -
+ The fixed index of the first dimension.
+
+ + + + index2 + + : + int
+ -
+ The fixed index of the second dimension.
+
+ + + + start3 + + : + int option
+ -
+ The start index of the third dimension.
+
+ + + + finish3 + + : + int option
+ -
+ The end index of the third dimension.
+
+ + + + index4 + + : + int
+ -
+ The fixed index of the fourth dimension.
+
+ + + + source + + : + 'T[]
+ -
+ The source array.
+
+ + + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ SetArraySlice4DFixedTriple4 target index1 index2 index3 start4 finish4 source
+ + + Parameters: +
'T[,,,]
+ -
+ The target array.
+
+ + + + index1 + + : + int
+ -
+ The fixed index of the first dimension.
+
+ + + + index2 + + : + int
+ -
+ The fixed index of the second dimension.
+
+ + + + index3 + + : + int
+ -
+ The fixed index of the third dimension.
+
+ + + + start4 + + : + int option
+ -
+ The start index of the fourth dimension.
+
+ + + + finish4 + + : + int option
+ -
+ The end index of the fourth dimension.
+
+ + + + source + + : + 'T[]
+ -
+ The source array.
+
+ + + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ SignDynamic arg1
+ + + Parameters: +
'T
+
+ + + + Returns: + int
+
+ + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ SinDynamic x
+ + + Parameters: +
'T
+
+ + + + Returns: + 'T
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ SinhDynamic x
+ + + Parameters: +
'T
+
+ + + + Returns: + 'T
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ SqrtDynamic arg1
+ + + Parameters: +
'T1
+
+ + + + Returns: + 'T2
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ TanDynamic x
+ + + Parameters: +
'T
+
+ + + + Returns: + 'T
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ TanhDynamic x
+ + + Parameters: +
'T
+
+ + + + Returns: + 'T
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ TruncateDynamic x
+ + + Parameters: +
'T
+
+ + + + Returns: + 'T
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + This is a library intrinsic. Calls to this function may be generated by evaluating quotations. + + |
+
+ This module contains basic operations which do not apply runtime and/or static checks +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ compare arg1 arg2
+ + + Parameters: +
'T
+
+ + + + arg1 + + : + 'T
+
+ + + + Returns: + int
+
+ The result of the comparison.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Perform generic comparison on two values where the type of the values is not + statically required to have the 'comparison' constraint. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ defaultof
+ + + + Returns: + 'T
+
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Generate a default value for any type. This is null for reference types,
+ For structs, this is struct value where all fields have the default value.
+ This function is unsafe in the sense that some F# values do not have proper |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ equals arg1 arg2
+ + + Parameters: +
'T
+
+ + + + arg1 + + : + 'T
+
+ + + + Returns: + bool
+
+ The result of the comparison.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Perform generic equality on two values where the type of the values is not + statically required to satisfy the 'equality' constraint. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ hash arg1
+ + + Parameters: +
'T
+
+ + + + Returns: + int
+
+ The computed hash value.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ unbox value
+ + + Parameters: +
obj
+ -
+ The boxed value.
+
+ + + + Returns: + 'T
+
+ The unboxed result.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+ + + | +
+ Basic F# Operators. This module is automatically opened in all F# code. +
++ Modules + | ++ Description + | +
+ + + + ArrayExtensions + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Contains extension methods to allow the use of F# indexer notation with arrays. + This module is automatically opened in all F# code. + + |
+
+ + + + Checked + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + This module contains the basic arithmetic operations with overflow checks. + + |
+
+ + + + NonStructuralComparison + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A module of comparison and equality operators that are statically resolved, but which are not fully generic and do not make structural comparison. Opening this + module may make code that relies on structural or generic comparison no longer compile. + + |
+
+ + + + OperatorIntrinsics + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A module of compiler intrinsic functions for efficient implementations of F# integer ranges + and dynamic invocations of other F# operators + + |
+
+ + + + Unchecked + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + This module contains basic operations which do not apply runtime and/or static checks + + |
+
+ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ x ** y
+ + + Parameters: +
^T
+ -
+ The input base.
+
+ + + + y + + : + ^U
+ -
+ The input exponent.
+
+ + + + Returns: + ^T
+
+ The base raised to the exponent.
+ + Modifiers: + inline + + Type parameters: + ^T, ^U + |
+
+
+
+ + ++
+ Example +++
+
+
+
+ |
+
+ + | +
+
+
+ + ++
+ Example +++
+val count: int ref
+Multiple items
+val ref: value: 'T -> 'T ref -------------------- type 'T ref = Ref<'T> property Ref.Value: int with get, set
+
+
+
+ |
+
+ + | +
+
+
+ + ++
+ Example +++
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ x &&& y
+ + + Parameters: +
^T
+ -
+ The first parameter.
+
+ + + + y + + : + ^T
+ -
+ The second parameter.
+
+ + + + Returns: + ^T
+
+ The result of the operation.
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+ + ++
+ Example +++
+val a: int
+val b: int
+val c: int
+
+
+ Evaluates to 9
+
+
+ |
+
+ + | +
+
+
+ + ++
+ Example +++
+
+
+
+ |
+
+ + | +
+
+
+ + ++
+ Example +++
+
+
+
+ |
+
+ + | +
+
+
+ + ++
+ Example +++
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ (....) start step finish
+ + + Parameters: +
^T
+ -
+ The start value of the range.
+
+ + + + step + + : + ^Step
+ -
+ The step value of the range.
+
+ + + + finish + + : + ^T
+ -
+ The end value of the range.
+
+ + + + Returns: + ^T seq
+
+ The sequence spanning the range using the specified step size.
+ + Modifiers: + inline + + Type parameters: + ^T, ^Step + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The standard overloaded skip range operator, e.g. |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ (..) start finish
+ + + Parameters: +
^T
+ -
+ The start value of the range.
+
+ + + + finish + + : + ^T
+ -
+ The end value of the range.
+
+ + + + Returns: + ^T seq
+
+ The sequence spanning the range.
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The standard overloaded range operator, e.g. |
+
+ + | +
+
+
+ + ++
+ Example +++
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ cell := value
+ + + Parameters: +
'T ref
+ -
+ The cell to mutate.
+
+ + + + value + + : + 'T
+ -
+ The value to set inside the cell.
+
+ + + |
+
+
+
+ + ++
+ Example +++
+val count: int ref
+Multiple items
+val ref: value: 'T -> 'T ref -------------------- type 'T ref = Ref<'T> property Ref.Value: int with get, set
+
+
+
+ |
+
+ + | +
+
+
+ + ++
+ Example +++
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ func2 << func1
+ + + Parameters: +
'T2 -> 'T3
+ -
+ The second function to apply.
+
+ + + + func1 + + : + 'T1 -> 'T2
+ -
+ The first function to apply.
+
+ + + + Returns: + 'T1 -> 'T3
+
+ The composition of the input functions.
+ + Modifiers: + inline + + Type parameters: + 'T2, 'T3, 'T1 + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Compose two functions, the function on the right being applied first + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ value <<< shift
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + shift + + : + int32
+ -
+ The amount to shift.
+
+ + + + Returns: + ^T
+
+ The result of the operation.
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+ + ++
+ Example +++
+val a: int
+val c: int
+
+
+ Evaluates to 208
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ x <= y
+ + + Parameters: +
'T
+ -
+ The first parameter.
+
+ + + + y + + : + 'T
+ -
+ The second parameter.
+
+ + + + Returns: + bool
+
+ The result of the comparison.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
+ Example +++
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ x <> y
+ + + Parameters: +
'T
+ -
+ The first parameter.
+
+ + + + y + + : + 'T
+ -
+ The second parameter.
+
+ + + + Returns: + bool
+
+ The result of the comparison.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
+ Example +++
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ func <| arg1
+ + + Parameters: +
'T -> 'U
+ -
+ The function.
+
+ + + + arg1 + + : + 'T
+ -
+ The argument.
+
+ + + + Returns: + 'U
+
+ The function result.
+ + Modifiers: + inline + + Type parameters: + 'T, 'U + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Apply a function to a value, the value being on the right, the function on the left + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ (<||) func (arg1, arg2)
+ + + Parameters: +
'T1 -> 'T2 -> 'U
+ -
+ The function.
+
+ + + + arg1 + + : + 'T1
+ -
+ The first argument.
+
+ + + + arg2 + + : + 'T2
+ -
+ The second argument.
+
+ + + + Returns: + 'U
+
+ The function result.
+ + Modifiers: + inline + + Type parameters: + 'T1, 'T2, 'U + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Apply a function to two values, the values being a pair on the right, the function on the left + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ (<|||) func (arg1, arg2, arg3)
+ + + Parameters: +
'T1 -> 'T2 -> 'T3 -> 'U
+ -
+ The function.
+
+ + + + arg1 + + : + 'T1
+ -
+ The first argument.
+
+ + + + arg2 + + : + 'T2
+ -
+ The second argument.
+
+ + + + arg3 + + : + 'T3
+ -
+ The third argument.
+
+ + + + Returns: + 'U
+
+ The function result.
+ + Modifiers: + inline + + Type parameters: + 'T1, 'T2, 'T3, 'U + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Apply a function to three values, the values being a triple on the right, the function on the left + + |
+
+ + | +
+
+
+ + ++
+ Example +++
+
+
+
+ |
+
+ + | +
+
+
+ + ++
+ Example +++
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ x >= y
+ + + Parameters: +
'T
+ -
+ The first parameter.
+
+ + + + y + + : + 'T
+ -
+ The second parameter.
+
+ + + + Returns: + bool
+
+ The result of the comparison.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
+ Example +++
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ func1 >> func2
+ + + Parameters: +
'T1 -> 'T2
+ -
+ The first function to apply.
+
+ + + + func2 + + : + 'T2 -> 'T3
+ -
+ The second function to apply.
+
+ + + + Returns: + 'T1 -> 'T3
+
+ The composition of the input functions.
+ + Modifiers: + inline + + Type parameters: + 'T1, 'T2, 'T3 + |
+
+
+
+ + ++
+ Example +++
+val addOne: x: int -> int
+val x: int
+val doubleIt: x: int -> int
+val addThenDouble: (int -> int)
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ value >>> shift
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + shift + + : + int32
+ -
+ The amount to shift.
+
+ + + + Returns: + ^T
+
+ The result of the operation.
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+ + ++
+ Example +++
+val a: int
+val c1: int
+val c2: int
+
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+val l1: char list
+val l2: char list
+
+
+
+ |
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ x ^^^ y
+ + + Parameters: +
^T
+ -
+ The first parameter.
+
+ + + + y + + : + ^T
+ -
+ The second parameter.
+
+ + + + Returns: + ^T
+
+ The result of the operation.
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+ + ++
+ Example +++
+val a: int
+val b: int
+val c: int
+
+
+ Evaluates to 6
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ arg |> func
+ + + Parameters: +
'T1
+ -
+ The argument.
+
+ + + + func + + : + 'T1 -> 'U
+ -
+ The function.
+
+ + + + Returns: + 'U
+
+ The function result.
+ + Modifiers: + inline + + Type parameters: + 'T1, 'U + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Apply a function to a value, the value being on the left, the function on the right + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ (||>) (arg1, arg2) func
+ + + Parameters: +
'T1
+ -
+ The first argument.
+
+ + + + arg2 + + : + 'T2
+ -
+ The second argument.
+
+ + + + func + + : + 'T1 -> 'T2 -> 'U
+ -
+ The function.
+
+ + + + Returns: + 'U
+
+ The function result.
+ + Modifiers: + inline + + Type parameters: + 'T1, 'T2, 'U + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Apply a function to two values, the values being a pair on the left, the function on the right + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ x ||| y
+ + + Parameters: +
^T
+ -
+ The first parameter.
+
+ + + + y + + : + ^T
+ -
+ The second parameter.
+
+ + + + Returns: + ^T
+
+ The result of the operation.
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+ + ++
+ Example +++
+val a: int
+val b: int
+val c: int
+
+
+ Evaluates to 15
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ (|||>) (arg1, arg2, arg3) func
+ + + Parameters: +
'T1
+ -
+ The first argument.
+
+ + + + arg2 + + : + 'T2
+ -
+ The second argument.
+
+ + + + arg3 + + : + 'T3
+ -
+ The third argument.
+
+ + + + func + + : + 'T1 -> 'T2 -> 'T3 -> 'U
+ -
+ The function.
+
+ + + + Returns: + 'U
+
+ The function result.
+ + Modifiers: + inline + + Type parameters: + 'T1, 'T2, 'T3, 'U + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Apply a function to three values, the values being a triple on the left, the function on the right + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ~+value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + ^T
+
+ The result of the operation.
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+ + ++
|
+
+ + | +
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ~~~value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + ^T
+
+ The result of the operation.
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+ + ++
+ Example +++
+val byte1: byte
+val byte2: int
+
+
+ Evaluates to 195
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+val throwException: unit -> bool
+val raise: exn: System.Exception -> 'T
+Multiple items
+
+
+
+ val Failure: message: string -> exn -------------------- active recognizer Failure: exn -> string option |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Negate a logical value. Not True equals False and not False equals True + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ abs value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + ^T
+
+ The absolute value of the input.
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+ + ++
+ Example +++
+val abs: value: 'T -> 'T (requires member Abs)
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ acos value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + ^T
+
+ The inverse cosine of the input.
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+ + ++
+ Example +++
+val angleFromAdjacent: adjacent: float -> hypotenuse: float -> float
+val adjacent: float
+val hypotenuse: float
+val acos: value: 'T -> 'T (requires member Acos)
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ asin value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + ^T
+
+ The inverse sine of the input.
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+ + ++
+ Example +++
+val angleFromOpposite: opposite: float -> hypotenuse: float -> float
+val opposite: float
+val hypotenuse: float
+val asin: value: 'T -> 'T (requires member Asin)
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ atan value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + ^T
+
+ The inverse tangent of the input.
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+ + ++
+ Example +++
+val angleFrom: opposite: float -> adjacent: float -> float
+val opposite: float
+val adjacent: float
+val atan: value: 'T -> 'T (requires member Atan)
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ atan2 y x
+ + + Parameters: +
^T1
+ -
+ The y input value.
+
+ + + + x + + : + ^T1
+ -
+ The x input value.
+
+ + + + Returns: + 'T2
+
+ The inverse tangent of the input ratio.
+ + Modifiers: + inline + + Type parameters: + ^T1, 'T2 + |
+
+
+
+ + ++
+ Example +++
+val angleFromPlaneAtXY: x: float -> y: float -> float
+val x: float
+val y: float
+val atan2: y: 'T1 -> x: 'T1 -> 'T2 (requires member Atan2)
+namespace System
+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 + 2 overloads
+ static member BitDecrement: x: float -> float
+ ...
+<summary>Provides constants and static methods for trigonometric, logarithmic, and other common mathematical functions.</summary> field System.Math.PI: float = 3.14159265359
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ box value
+ + + Parameters: +
'T
+ -
+ The value to box.
+
+ + + + Returns: + obj
+
+ The boxed object.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
+ Example +++
+val x: int
+Multiple items
+val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = + int val obj1: obj
+val box: value: 'T -> obj
+val unbox: value: obj -> 'T
+Multiple items
+
+
+
+ val double: value: 'T -> double (requires member op_Explicit) -------------------- type double = System.Double -------------------- type double<'Measure> = float<'Measure> |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ byte value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + byte
+
+ The converted byte
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Converts the argument to byte. This is a direct conversion for all
+ primitive numeric types. For strings, the input is converted using |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ceil value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + ^T
+
+ The ceiling of the input.
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+ + ++
+ Example +++
+val ceil: value: 'T -> 'T (requires member Ceiling)
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ char value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + char
+
+ The converted char.
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Converts the argument to character. Numeric inputs are converted according to the UTF-16 + encoding for characters. String inputs must be exactly one character long. For other + input types the operation requires an appropriate static conversion method on the input type. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ compare e1 e2
+ + + Parameters: +
'T
+ -
+ The first value.
+
+ + + + e2 + + : + 'T
+ -
+ The second value.
+
+ + + + Returns: + int
+
+ The result of the comparison.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
+ Example +++
+val compare: e1: 'T -> e2: 'T -> int (requires comparison)
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ cos value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + ^T
+
+ The cosine of the input.
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+ + ++
+ Example +++
+val cos: value: 'T -> 'T (requires member Cos)
+namespace System
+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 + 2 overloads
+ static member BitDecrement: x: float -> float
+ ...
+<summary>Provides constants and static methods for trigonometric, logarithmic, and other common mathematical functions.</summary> field System.Math.PI: float = 3.14159265359
+
+
+
+ <summary>Represents the ratio of the circumference of a circle to its diameter, specified by the constant, π.</summary> |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ cosh value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + ^T
+
+ The hyperbolic cosine of the input.
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+ + ++
+ Example +++
+val cosh: value: 'T -> 'T (requires member Cosh)
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ decimal value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + decimal
+
+ The converted decimal.
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Converts the argument to System.Decimal using a direct conversion for all
+ primitive numeric types. For strings, the input is converted using |
+
+
+
+
+
+
+ |
+
+
+
+ + ++ ++ Example +++
+val count: int ref
+Multiple items
+val ref: value: 'T -> 'T ref -------------------- type 'T ref = Ref<'T> val decr: cell: int ref -> unit
+property Ref.Value: int with get, set
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ defaultArg arg defaultValue
+ + + Parameters: +
'T option
+ -
+ An option representing the argument.
+
+ + + + defaultValue + + : + 'T
+ -
+ The default value of the argument.
+
+ + + + Returns: + 'T
+
+ The argument value. If it is None, the defaultValue is returned.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Used to specify a default value for an optional argument in the implementation of a function + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ defaultValueArg arg defaultValue
+ + + Parameters: +
'T voption
+ -
+ A value option representing the argument.
+
+ + + + defaultValue + + : + 'T
+ -
+ The default value of the argument.
+
+ + + + Returns: + 'T
+
+ The argument value. If it is None, the defaultValue is returned.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Used to specify a default value for an optional argument in the implementation of a function + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ enum value
+ + + Parameters: +
int32
+ -
+ The input value.
+
+ + + + Returns: + ^U
+
+ The converted enum type.
+ + Modifiers: + inline + + Type parameters: + ^U + |
+
+
+
+ + ++
+ Example +++
+[<Struct>]
+type Color =
+ | Red = 1
+ | Green = 2
+ | Blue = 3
+Color.Red: Color = 1
+Color.Green: Color = 2
+Color.Blue: Color = 3
+val c: Color
+val enum: value: int32 -> 'U (requires enum)
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ exit exitcode
+ + + Parameters: +
int
+ -
+ The exit code to use.
+
+ + + + Returns: + 'T
+
+ Never returns.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Exit the current hardware isolated process, if security settings permit, + otherwise raise an exception. Calls Environment.Exit. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ exp value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + ^T
+
+ The exponential of the input.
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+ + ++
+ Example +++
+val exp: value: 'T -> 'T (requires member Exp)
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ failwith message
+ + + Parameters: +
string
+ -
+ The exception message.
+
+ + + + Returns: + 'T
+
+ Never returns.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
+ Example +++
+val failingFunction: unit -> bool
+val failwith: message: string -> 'T
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ float value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + float
+
+ The converted float
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Converts the argument to 64-bit float. This is a direct conversion for all
+ primitive numeric types. For strings, the input is converted using |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ float32 value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + float32
+
+ The converted float32
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Converts the argument to 32-bit float. This is a direct conversion for all
+ primitive numeric types. For strings, the input is converted using |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ floor value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + ^T
+
+ The floor of the input.
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+ + ++
+ Example +++
+val floor: value: 'T -> 'T (requires member Floor)
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ fst tuple
+ + + Parameters: +
'T1 * 'T2
+ -
+ The input tuple.
+
+ + + + Returns: + 'T1
+
+ The first value.
+ + Modifiers: + inline + + Type parameters: + 'T1, 'T2 + |
+
+
+
+ + ++
+ Example +++
+val fst: tuple: ('T1 * 'T2) -> 'T1
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ hash obj
+ + + Parameters: +
'T
+ -
+ The input object.
+
+ + + + Returns: + int
+
+ The computed hash.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A generic hash function, designed to return equal hash values for items that are + equal according to the "=" operator. By default it will use structural hashing + for F# union, record and tuple types, hashing the complete contents of the + type. The exact behaviour of the function can be adjusted on a + type-by-type basis by implementing GetHashCode for each type. + + |
+
+ + | +
+
+
+ + ++
+ Example +++
+val id: x: 'T -> 'T
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ignore value
+ + + Parameters: +
'T
+ -
+ The value to ignore.
+
+ + + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Ignore the passed value. This is often used to throw away results of a computation. + + |
+
+
+
+
+
+
+ |
+
+
+
+ + ++ ++ Example +++
+val count: int ref
+Multiple items
+val ref: value: 'T -> 'T ref -------------------- type 'T ref = Ref<'T> val incr: cell: int ref -> unit
+property Ref.Value: int with get, set
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ int value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + int
+
+ The converted int
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Converts the argument to signed 32-bit integer. This is a direct conversion for all
+ primitive numeric types. For strings, the input is converted using |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ int16 value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + int16
+
+ The converted int16
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Converts the argument to signed 16-bit integer. This is a direct conversion for all
+ primitive numeric types. For strings, the input is converted using |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ int32 value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + int32
+
+ The converted int32
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Converts the argument to signed 32-bit integer. This is a direct conversion for all
+ primitive numeric types. For strings, the input is converted using |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ int64 value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + int64
+
+ The converted int64
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Converts the argument to signed 64-bit integer. This is a direct conversion for all
+ primitive numeric types. For strings, the input is converted using |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Throw a ArgumentException exception with + the given argument name and message. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ invalidOp message
+ + + Parameters: +
string
+ -
+ The exception message.
+
+ + + + Returns: + 'T
+
+ The result value.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
+ Example +++
+Multiple items
+type FileReader = + new: fileName: string -> FileReader + member Open: unit -> unit -------------------- new: fileName: string -> FileReader val fileName: string
+Multiple items
+val string: value: 'T -> string -------------------- type string = System.String val mutable isOpen: bool
+val this: FileReader
+val invalidOp: message: string -> 'T
+val reader: FileReader
+member FileReader.Open: unit -> unit
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ isNull value
+ + + Parameters: +
'T
+ -
+ The value to check.
+
+ + + + Returns: + bool
+
+ True when value is null, false otherwise.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
+ Example +++
+val isNull: value: 'T -> bool (requires 'T: null)
+
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A generic hash function. This function has the same behaviour as 'hash', + however the default structural hashing for F# union, record and tuple + types stops when the given limit of nodes is reached. The exact behaviour of + the function can be adjusted on a type-by-type basis by implementing + GetHashCode for each type. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ lock lockObject action
+ + + Parameters: +
'Lock
+ -
+ The object to be locked.
+
+ + + + action + + : + unit -> 'T
+ -
+ The action to perform during the lock.
+
+ + + + Returns: + 'T
+
+ The resulting value.
+ + Modifiers: + inline + + Type parameters: + 'Lock, 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Execute the function as a mutual-exclusion region using the input value as a lock. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ log value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + ^T
+
+ The natural logarithm of the input.
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+ + ++
+ Example +++
+val logBase: baseNumber: float -> value: float -> float
+val baseNumber: float
+val value: float
+val log: value: 'T -> 'T (requires member Log)
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ log10 value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + ^T
+
+ The logarithm to base 10 of the input.
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+ + ++
+ Example +++
+val log10: value: 'T -> 'T (requires member Log10)
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ max e1 e2
+ + + Parameters: +
'T
+ -
+ The first value.
+
+ + + + e2 + + : + 'T
+ -
+ The second value.
+
+ + + + Returns: + 'T
+
+ The maximum value.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
+ Example +++
+val max: e1: 'T -> e2: 'T -> 'T (requires comparison)
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ methodhandleof arg1
+ + + Parameters: +
'T -> 'TResult
+
+ + + + Returns: + RuntimeMethodHandle
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + An internal, library-only compiler intrinsic for compile-time + generation of a RuntimeMethodHandle. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ min e1 e2
+ + + Parameters: +
'T
+ -
+ The first value.
+
+ + + + e2 + + : + 'T
+ -
+ The second value.
+
+ + + + Returns: + 'T
+
+ The minimum value.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
+ Example +++
+val min: e1: 'T -> e2: 'T -> 'T (requires comparison)
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ nameof arg1
+ + + Parameters: +
'T
+
+ + + + Returns: + string
+
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
+ Example +++
+val myVariableName: string
+val nameof: 'T -> string
+
+
+
+ |
+
+ + | +
+
+
+ + ++
|
+
+ + | +
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ nativeint value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + nativeint
+
+ The converted nativeint
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Converts the argument to signed native integer. This is a direct conversion for all + primitive numeric types. Otherwise the operation requires an appropriate + static conversion method on the input type. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ nullArg argumentName
+ + + Parameters: +
string
+ -
+ The argument name.
+
+ + + + Returns: + 'T
+
+ Never returns.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
+ Example +++
+val fullName: firstName: string -> lastName: string -> string
+val firstName: string
+val lastName: string
+val isNull: value: 'T -> bool (requires 'T: null)
+val nullArg: argumentName: string -> 'T
+val nameof: 'T -> string
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ pown x n
+ + + Parameters: +
^T
+ -
+ The input base.
+
+ + + + n + + : + int
+ -
+ The input exponent.
+
+ + + + Returns: + ^T
+
+ The base raised to the exponent.
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Overloaded power operator. If |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ raise exn
+ + + Parameters: +
Exception
+ -
+ The exception to raise.
+
+ + + + Returns: + 'T
+
+ The result value.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
+ Example +++
+namespace System
+namespace System.IO
+exception FileNotFoundException of string
+Multiple items
+val string: value: 'T -> string -------------------- type string = System.String val readFile: fileName: string -> string
+val fileName: string
+type File =
+ static member AppendAllLines: path: string * contents: IEnumerable<string> -> unit + 1 overload
+ static member AppendAllLinesAsync: path: string * contents: IEnumerable<string> * encoding: Encoding * ?cancellationToken: CancellationToken -> Task + 1 overload
+ static member AppendAllText: path: string * contents: string -> unit + 1 overload
+ static member AppendAllTextAsync: path: string * contents: string * encoding: Encoding * ?cancellationToken: CancellationToken -> Task + 1 overload
+ static member AppendText: path: string -> StreamWriter
+ static member Copy: sourceFileName: string * destFileName: string -> unit + 1 overload
+ static member Create: path: string -> FileStream + 2 overloads
+ static member CreateSymbolicLink: path: string * pathToTarget: string -> FileSystemInfo
+ static member CreateText: path: string -> StreamWriter
+ static member Decrypt: path: string -> unit
+ ...
+<summary>Provides static methods for the creation, copying, deletion, moving, and opening of a single file, and aids in the creation of <see cref="T:System.IO.FileStream" /> objects.</summary> File.Exists(path: string) : bool
+val raise: exn: System.Exception -> 'T
+File.ReadAllText(path: string) : string
+
+
+ When executed, raises a File.ReadAllText(path: string, encoding: System.Text.Encoding) : string FileNotFoundException .
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ref value
+ + + Parameters: +
'T
+ -
+ The value to contain in the cell.
+
+ + + + Returns: + 'T ref
+
+ The created reference cell.
+ + |
+
+
+
+ + ++
+ Example +++
+val count: int ref
+Multiple items
+val ref: value: 'T -> 'T ref -------------------- type 'T ref = Ref<'T> property Ref.Value: int with get, set
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ reraise ()
+ + + Parameters: +
unit
+
+ + + + Returns: + 'T
+
+ The result value.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Rethrows an exception. This should only be used when handling an exception + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ round value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + ^T
+
+ The nearest integer to the input value.
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+ + ++
+ Example +++
+val round: value: 'T -> 'T (requires member Round)
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ sbyte value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + sbyte
+
+ The converted sbyte
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Converts the argument to signed byte. This is a direct conversion for all
+ primitive numeric types. For strings, the input is converted using |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+Multiple items
+val seq: sequence: 'T seq -> 'T seq -------------------- type 'T seq = System.Collections.Generic.IEnumerable<'T> val i: int
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ sign value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + int
+
+ -1, 0, or 1 depending on the sign of the input.
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+ + ++
+ Example +++
+val sign: value: 'T -> int (requires member Sign)
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ sin value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + ^T
+
+ The sine of the input.
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+ + ++
+ Example +++
+val sin: value: 'T -> 'T (requires member Sin)
+namespace System
+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 + 2 overloads
+ static member BitDecrement: x: float -> float
+ ...
+<summary>Provides constants and static methods for trigonometric, logarithmic, and other common mathematical functions.</summary> field System.Math.PI: float = 3.14159265359
+
+
+
+ <summary>Represents the ratio of the circumference of a circle to its diameter, specified by the constant, π.</summary> |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ sinh value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + ^T
+
+ The hyperbolic sine of the input.
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+ + ++
+ Example +++
+val sinh: value: 'T -> 'T (requires member Sinh)
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns the internal size of a type in bytes. For example, |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ snd tuple
+ + + Parameters: +
'T1 * 'T2
+ -
+ The input tuple.
+
+ + + + Returns: + 'T2
+
+ The second value.
+ + Modifiers: + inline + + Type parameters: + 'T1, 'T2 + |
+
+
+
+ + ++
+ Example +++
+val snd: tuple: ('T1 * 'T2) -> 'T2
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ sqrt value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + ^U
+
+ The square root of the input.
+ + Modifiers: + inline + + Type parameters: + ^T, ^U + |
+
+
+
+ + ++
+ Example +++
+val sqrt: value: 'T -> 'U (requires member Sqrt)
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ string value
+ + + Parameters: +
'T
+ -
+ The input value.
+
+ + + + Returns: + string
+
+ The converted string.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
+ For standard integer and floating point values and any type that implements
+ Example +++
+Multiple items
+
+
+
+ val string: value: 'T -> string -------------------- type string = System.String |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ tan value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + ^T
+
+ The tangent of the input.
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+ + ++
+ Example +++
+val tan: value: 'T -> 'T (requires member Tan)
+namespace System
+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 + 2 overloads
+ static member BitDecrement: x: float -> float
+ ...
+<summary>Provides constants and static methods for trigonometric, logarithmic, and other common mathematical functions.</summary> field System.Math.PI: float = 3.14159265359
+
+
+
+ <summary>Represents the ratio of the circumference of a circle to its diameter, specified by the constant, π.</summary> |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ tanh value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + ^T
+
+ The hyperbolic tangent of the input.
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+ + ++
+ Example +++
+val tanh: value: 'T -> 'T (requires member Tanh)
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ truncate value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + ^T
+
+ The truncated value.
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+ + ++
+ Example +++
+val truncate: value: 'T -> 'T (requires member Truncate)
+
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+val x: int
+Multiple items
+val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = + int val obj1: obj
+val box: value: 'T -> obj
+val tryUnbox: value: obj -> 'T option
+Multiple items
+
+
+
+ val double: value: 'T -> double (requires member op_Explicit) -------------------- type double = System.Double -------------------- type double<'Measure> = float<'Measure> |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ typedefof
+ + + + Returns: + Type
+
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Generate a System.Type representation for a type definition. If the + input type is a generic type instantiation then return the + generic type definition associated with all such instantiations. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ typeof
+ + + + Returns: + Type
+
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
+ Example +++
+val t: System.Type
+val typeof<'T> : System.Type
+Multiple items
+val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = + int property System.Type.FullName: string with get
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ uint value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + uint
+
+ The converted int
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Converts the argument to an unsigned 32-bit integer. This is a direct conversion for all
+ primitive numeric types. For strings, the input is converted using |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ uint16 value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + uint16
+
+ The converted uint16
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Converts the argument to unsigned 16-bit integer. This is a direct conversion for all
+ primitive numeric types. For strings, the input is converted using |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ uint32 value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + uint32
+
+ The converted uint32
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Converts the argument to unsigned 32-bit integer. This is a direct conversion for all
+ primitive numeric types. For strings, the input is converted using |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ uint64 value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + uint64
+
+ The converted uint64
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Converts the argument to unsigned 64-bit integer. This is a direct conversion for all
+ primitive numeric types. For strings, the input is converted using |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ unativeint value
+ + + Parameters: +
^T
+ -
+ The input value.
+
+ + + + Returns: + unativeint
+
+ The converted unativeint
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Converts the argument to unsigned native integer using a direct conversion for all + primitive numeric types. Otherwise the operation requires an appropriate + static conversion method on the input type. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ unbox value
+ + + Parameters: +
obj
+ -
+ The boxed value.
+
+ + + + Returns: + 'T
+
+ The unboxed result.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
+ Example +++
+val x: int
+Multiple items
+val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = + int val obj1: obj
+val box: value: 'T -> obj
+val unbox: value: obj -> 'T
+Multiple items
+
+
+
+ val double: value: 'T -> double (requires member op_Explicit) -------------------- type double = System.Double -------------------- type double<'Measure> = float<'Measure> |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ using resource action
+ + + Parameters: +
'T
+ -
+ The resource to be disposed after action is called.
+
+ + + + action + + : + 'T -> 'U
+ -
+ The action that accepts the resource.
+
+ + + + Returns: + 'U
+
+ The resulting value.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Clean up resources associated with the input object after the completion of the given function. + Cleanup occurs even when an exception is raised by the protected + code. + + |
+
+ Active pattern + | ++ Description + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ (|KeyValue|) keyValuePair
+ + + Parameters: +
KeyValuePair<'Key, 'Value>
+ -
+ The input key/value pair.
+
+ + + + Returns: + 'Key * 'Value
+
+ A tuple containing the key and value.
+ + |
+
+
+
+ + ++
+ Example +++
+val kv: System.Collections.Generic.KeyValuePair<int,string>
+namespace System
+namespace System.Collections
+namespace System.Collections.Generic
+Multiple items
+[<Struct>] +type KeyValuePair<'TKey,'TValue> = + new: key: 'TKey * value: 'TValue -> unit + member Deconstruct: key: byref<'TKey> * value: byref<'TValue> -> unit + member ToString: unit -> string + member Key: 'TKey + member Value: 'TValue <summary>Defines a key/value pair that can be set or retrieved.</summary> <typeparam name="TKey">The type of the key.</typeparam> <typeparam name="TValue">The type of the value.</typeparam> -------------------- type KeyValuePair = + static member Create<'TKey,'TValue> : key: 'TKey * value: 'TValue -> KeyValuePair<'TKey,'TValue> <summary>Creates instances of the <see cref="T:System.Collections.Generic.KeyValuePair`2" /> struct.</summary> -------------------- System.Collections.Generic.KeyValuePair () System.Collections.Generic.KeyValuePair(key: 'TKey, value: 'TValue) : System.Collections.Generic.KeyValuePair<'TKey,'TValue> active recognizer KeyValue: System.Collections.Generic.KeyValuePair<'Key,'Value> -> 'Key * 'Value
+val v: string
+val k: int
+
+
+
+ |
+
+ The CLI type used to represent F# function values that accept + two iterated (curried) arguments without intervening execution. This type should not + typically used directly from either F# code or from other CLI languages. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ FSharpFunc()
+ + + + Returns: + FSharpFunc<'T1, 'T2, 'U>
+
+ The optimized function.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Construct an optimized function value that can accept two curried + arguments without intervening execution. + + |
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Invoke
+ + + Parameters: +
'T1
+ -
+ The first arg.
+
+ + + + arg2 + + : + 'T2
+ -
+ The second arg.
+
+ + + + Returns: + 'U
+
+ The function result.
+ + Modifiers: + abstract + + |
+
+
+
+ + ++
|
+
+ Static member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ FSharpFunc.Adapt(func)
+ + + Parameters: +
'T1 -> 'T2 -> 'U
+ -
+ The input function.
+
+ + + + Returns: + FSharpFunc<'T1, 'T2, 'U>
+
+ The adapted function.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Adapt an F# first class function value to be an optimized function value that can + accept two curried arguments without intervening execution. + + |
+
+ The CLI type used to represent F# function values that accept + three iterated (curried) arguments without intervening execution. This type should not + typically used directly from either F# code or from other CLI languages. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ FSharpFunc()
+ + + + Returns: + FSharpFunc<'T1, 'T2, 'T3, 'U>
+
+ The optimized function.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Construct an optimized function value that can accept three curried + arguments without intervening execution. + + |
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Invoke
+ + + Parameters: +
'T1
+ -
+ The first arg.
+
+ + + + arg2 + + : + 'T2
+ -
+ The second arg.
+
+ + + + arg3 + + : + 'T3
+ -
+ The third arg.
+
+ + + + Returns: + 'U
+
+ The function result.
+ + Modifiers: + abstract + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Invoke an F# first class function value that accepts three curried arguments + without intervening execution + + |
+
+ Static member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ FSharpFunc.Adapt(func)
+ + + Parameters: +
'T1 -> 'T2 -> 'T3 -> 'U
+ -
+ The input function.
+
+ + + + Returns: + FSharpFunc<'T1, 'T2, 'T3, 'U>
+
+ The adapted function.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Adapt an F# first class function value to be an optimized function value that can + accept three curried arguments without intervening execution. + + |
+
+ The CLI type used to represent F# function values that accept four curried arguments + without intervening execution. This type should not typically used directly from + either F# code or from other CLI languages. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ FSharpFunc()
+ + + + Returns: + FSharpFunc<'T1, 'T2, 'T3, 'T4, 'U>
+
+ The optimized function.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Construct an optimized function value that can accept four curried + arguments without intervening execution. + + |
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Invoke
+ + + Parameters: +
'T1
+ -
+ The first arg.
+
+ + + + arg2 + + : + 'T2
+ -
+ The second arg.
+
+ + + + arg3 + + : + 'T3
+ -
+ The third arg.
+
+ + + + arg4 + + : + 'T4
+ -
+ The fourth arg.
+
+ + + + Returns: + 'U
+
+ The function result.
+ + Modifiers: + abstract + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Invoke an F# first class function value that accepts four curried arguments + without intervening execution + + |
+
+ Static member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ FSharpFunc.Adapt(func)
+ + + Parameters: +
'T1 -> 'T2 -> 'T3 -> 'T4 -> 'U
+ -
+ The input function.
+
+ + + + Returns: + FSharpFunc<'T1, 'T2, 'T3, 'T4, 'U>
+
+ The optimized function.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Adapt an F# first class function value to be an optimized function value that can + accept four curried arguments without intervening execution. + + |
+
+ The CLI type used to represent F# function values that accept five curried arguments + without intervening execution. This type should not typically used directly from + either F# code or from other CLI languages. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ FSharpFunc()
+ + + + Returns: + FSharpFunc<'T1, 'T2, 'T3, 'T4, 'T5, 'U>
+
+ The optimized function.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Construct an optimized function value that can accept five curried + arguments without intervening execution. + + |
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Invoke
+ + + Parameters: +
'T1
+ -
+ The first arg.
+
+ + + + arg2 + + : + 'T2
+ -
+ The second arg.
+
+ + + + arg3 + + : + 'T3
+ -
+ The third arg.
+
+ + + + arg4 + + : + 'T4
+ -
+ The fourth arg.
+
+ + + + arg5 + + : + 'T5
+ -
+ The fifth arg.
+
+ + + + Returns: + 'U
+
+ The function result.
+ + Modifiers: + abstract + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Invoke an F# first class function value that accepts five curried arguments + without intervening execution + + |
+
+ Static member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ FSharpFunc.Adapt(func)
+ + + Parameters: +
'T1 -> 'T2 -> 'T3 -> 'T4 -> 'T5 -> 'U
+ -
+ The input function.
+
+ + + + Returns: + FSharpFunc<'T1, 'T2, 'T3, 'T4, 'T5, 'U>
+
+ The optimized function.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Adapt an F# first class function value to be an optimized function value that can + accept five curried arguments without intervening execution. + + |
+
+ An implementation module used to hold some private implementations of function + value invocation. +
++ Type + | ++ Description + | +
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + The CLI type used to represent F# function values that accept + two iterated (curried) arguments without intervening execution. This type should not + typically used directly from either F# code or from other CLI languages. + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + The CLI type used to represent F# function values that accept + three iterated (curried) arguments without intervening execution. This type should not + typically used directly from either F# code or from other CLI languages. + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + The CLI type used to represent F# function values that accept four curried arguments + without intervening execution. This type should not typically used directly from + either F# code or from other CLI languages. + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + The CLI type used to represent F# function values that accept five curried arguments + without intervening execution. This type should not typically used directly from + either F# code or from other CLI languages. + + |
+
+ The type of optional values. When used from other CLI languages the
+ empty option is the null
value.
+
+ Use the constructors Some
and None
to create values of this type.
+ Use the values in the Option
module to manipulate values of this type,
+ or pattern match against the values directly.
+
+ 'None' values will appear as the value null
to other CLI languages.
+ Instance methods on this type will appear as static methods to other CLI languages
+ due to the use of null
as a value representation.
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Value
+ + + + Returns: + 'T
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Get the value of a 'Some' option. A NullReferenceException is raised if the option is 'None'. + + |
+
+ This attribute is added automatically for all optional arguments. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ OptionalArgumentAttribute()
+ + + + Returns: + OptionalArgumentAttribute
+
+ OptionalArgumentAttribute
+ + |
+
+
+
+ + ++
|
+
+ Contains operations for working with options. +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Option.bind binder option
+ + + Parameters: +
'T -> 'U option
+ -
+ A function that takes the value of type T from an option and transforms it into
+ an option containing a value of type U.
+
+ + + + option + + : + 'T option
+ -
+ The input option.
+
+ + + + Returns: + 'U option
+
+ An option of the output type of the binder.
+ + Modifiers: + inline + + Type parameters: + 'T, 'U + |
+
+
+
+ + ++
+ Example +++
+val tryParse: input: string -> int option
+val input: string
+Multiple items
+val string: value: 'T -> string -------------------- type string = System.String namespace System
+[<Struct>]
+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: destination: Span<char> * charsWritten: byref<int> * ?format: ReadOnlySpan<char> * ?provider: IFormatProvider -> bool + 1 overload
+ static member Abs: value: int -> int
+ static member Clamp: value: int * min: int * max: int -> int
+ static member CopySign: value: int * sign: int -> int
+ static member CreateChecked<'TOther (requires 'TOther :> INumberBase<'TOther>)> : value: 'TOther -> 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 v: int
+union case Option.Some: Value: 'T -> Option<'T>
+union case Option.None: Option<'T>
+module Option
+
+from Microsoft.FSharp.Core
+val bind: binder: ('T -> 'U option) -> option: 'T option -> 'U option
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Option.contains value option
+ + + Parameters: +
'T
+ -
+ The value to test for equality.
+
+ + + + option + + : + 'T option
+ -
+ The input option.
+
+ + + + Returns: + bool
+
+ True if the option is Some and contains a value equal to value, otherwise false.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Evaluates to true if option is |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+union case Option.None: Option<'T>
+module Option
+
+from Microsoft.FSharp.Core
+val count: option: 'T option -> int
+union case Option.Some: Value: 'T -> Option<'T>
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Option.defaultValue value option
+ + + Parameters: +
'T
+ -
+ The specified default value.
+
+ + + + option + + : + 'T option
+ -
+ The input option.
+
+ + + + Returns: + 'T
+
+ The option if the option is Some, else the default value.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Gets the value of the option if the option is |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Option.defaultWith defThunk option
+ + + Parameters: +
unit -> 'T
+ -
+ A thunk that provides a default value when evaluated.
+
+ + + + option + + : + 'T option
+ -
+ The input option.
+
+ + + + Returns: + 'T
+
+ The option if the option is Some, else the result of evaluating defThunk.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Gets the value of the option if the option is |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Option.exists predicate option
+ + + Parameters: +
'T -> bool
+ -
+ A function that evaluates to a boolean when given a value from the option type.
+
+ + + + option + + : + 'T option
+ -
+ The input option.
+
+ + + + Returns: + bool
+
+ False if the option is None, otherwise it returns the result of applying the predicate
+ to the option value.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Option.filter predicate option
+ + + Parameters: +
'T -> bool
+ -
+ A function that evaluates whether the value contained in the option should remain, or be filtered out.
+
+ + + + option + + : + 'T option
+ -
+ The input option.
+
+ + + + Returns: + 'T option
+
+ The input if the predicate evaluates to true; otherwise, None.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+
+ Example +++
+union case Option.None: Option<'T>
+Multiple items
+val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = + int type 'T option = Option<'T>
+module Option
+
+from Microsoft.FSharp.Core
+val flatten: option: 'T option option -> 'T option
+union case Option.Some: Value: 'T -> Option<'T>
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Option.fold folder state option
+ + + Parameters: +
'State -> 'T -> 'State
+ -
+ A function to update the state data when given a value from an option.
+
+ + + + state + + : + 'State
+ -
+ The initial state.
+
+ + + + option + + : + 'T option
+ -
+ The input option.
+
+ + + + Returns: + 'State
+
+ The original state if the option is None, otherwise it returns the updated state with the folder
+ and the option value.
+ + Modifiers: + inline + + Type parameters: + 'T, 'State + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Option.foldBack folder option state
+ + + Parameters: +
'T -> 'State -> 'State
+ -
+ A function to update the state data when given a value from an option.
+
+ + + + option + + : + 'T option
+ -
+ The input option.
+
+ + + + state + + : + 'State
+ -
+ The initial state.
+
+ + + + Returns: + 'State
+
+ The original state if the option is None, otherwise it returns the updated state with the folder
+ and the option value.
+ + Modifiers: + inline + + Type parameters: + 'T, 'State + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Option.forall predicate option
+ + + Parameters: +
'T -> bool
+ -
+ A function that evaluates to a boolean when given a value from the option type.
+
+ + + + option + + : + 'T option
+ -
+ The input option.
+
+ + + + Returns: + bool
+
+ True if the option is None, otherwise it returns the result of applying the predicate
+ to the option value.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Option.get option
+ + + Parameters: +
'T option
+ -
+ The input option.
+
+ + + + Returns: + 'T
+
+ The value within the option.
+ + |
+
+
+
+ + ++
+ Example +++
+union case Option.Some: Value: 'T -> Option<'T>
+module Option
+
+from Microsoft.FSharp.Core
+val get: option: 'T option -> 'T
+union case Option.None: Option<'T>
+Multiple items
+val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = + int type 'T option = Option<'T>
+
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+union case Option.None: Option<'T>
+module Option
+
+from Microsoft.FSharp.Core
+val isNone: option: 'T option -> bool
+union case Option.Some: Value: 'T -> Option<'T>
+
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+union case Option.None: Option<'T>
+module Option
+
+from Microsoft.FSharp.Core
+val isSome: option: 'T option -> bool
+union case Option.Some: Value: 'T -> Option<'T>
+
+
+
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+union case Option.None: Option<'T>
+module Option
+
+from Microsoft.FSharp.Core
+val iter: action: ('T -> unit) -> option: 'T option -> unit
+val printfn: format: Printf.TextWriterFormat<'T> -> 'T
+union case Option.Some: Value: 'T -> Option<'T>
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Option.map mapping option
+ + + Parameters: +
'T -> 'U
+ -
+ A function to apply to the option value.
+
+ + + + option + + : + 'T option
+ -
+ The input option.
+
+ + + + Returns: + 'U option
+
+ An option of the input value after applying the mapping function, or None if the input is None.
+ + Modifiers: + inline + + Type parameters: + 'T, 'U + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Option.map2 mapping option1 option2
+ + + Parameters: +
'T1 -> 'T2 -> 'U
+ -
+ A function to apply to the option values.
+
+ + + + option1 + + : + 'T1 option
+ -
+ The first option.
+
+ + + + option2 + + : + 'T2 option
+ -
+ The second option.
+
+ + + + Returns: + 'U option
+
+ An option of the input values after applying the mapping function, or None if either input is None.
+ + Modifiers: + inline + + Type parameters: + 'T1, 'T2, 'U + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Option.map3 mapping option1 option2 option3
+ + + Parameters: +
'T1 -> 'T2 -> 'T3 -> 'U
+ -
+ A function to apply to the option values.
+
+ + + + option1 + + : + 'T1 option
+ -
+ The first option.
+
+ + + + option2 + + : + 'T2 option
+ -
+ The second option.
+
+ + + + option3 + + : + 'T3 option
+ -
+ The third option.
+
+ + + + Returns: + 'U option
+
+ An option of the input values after applying the mapping function, or None if any input is None.
+ + Modifiers: + inline + + Type parameters: + 'T1, 'T2, 'T3, 'U + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+namespace System
+Multiple items
+[<Struct>] +type Nullable<'T (requires default constructor and value type and 'T :> ValueType)> = + new: value: 'T -> unit + member Equals: other: obj -> bool + member GetHashCode: unit -> int + member GetValueOrDefault: unit -> 'T + 1 overload + member ToString: unit -> string + static member op_Explicit: value: Nullable<'T> -> 'T + static member op_Implicit: value: 'T -> Nullable<'T> + member HasValue: bool + member Value: 'T <summary>Represents a value type that can be assigned <see langword="null" />.</summary> <typeparam name="T">The underlying value type of the <see cref="T:System.Nullable`1" /> generic type.</typeparam> -------------------- type Nullable = + static member Compare<'T (requires default constructor and value type and 'T :> ValueType)> : n1: Nullable<'T> * n2: Nullable<'T> -> int + static member Equals<'T (requires default constructor and value type and 'T :> ValueType)> : n1: Nullable<'T> * n2: Nullable<'T> -> bool + static member GetUnderlyingType: nullableType: Type -> Type + static member GetValueRefOrDefaultRef<'T (requires default constructor and value type and 'T :> ValueType)> : nullable: byref<Nullable<'T>> -> inref<'T> <summary>Supports a value type that can be assigned <see langword="null" />. This class cannot be inherited.</summary> -------------------- System.Nullable () System.Nullable(value: 'T) : System.Nullable<'T> Multiple items
+val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = + int module Option
+
+from Microsoft.FSharp.Core
+val ofNullable: value: System.Nullable<'T> -> 'T option (requires default constructor and value type and 'T :> System.ValueType)
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Option.ofObj value
+ + + Parameters: +
'T
+ -
+ The input value.
+
+ + + + Returns: + 'T option
+
+ The result option.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
+ Example +++
+Multiple items
+val string: value: 'T -> string -------------------- type string = System.String module Option
+
+from Microsoft.FSharp.Core
+val ofObj: value: 'T -> 'T option (requires 'T: null)
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Option.orElse ifNone option
+ + + Parameters: +
'T option
+ -
+ The value to use if option is None .
+
+ + + + option + + : + 'T option
+ -
+ The input option.
+
+ + + + Returns: + 'T option
+
+ The option if the option is Some, else the alternate option.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
+ Example +++
+union case Option.None: Option<'T>
+Multiple items
+val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = + int module Option
+
+from Microsoft.FSharp.Core
+val orElse: ifNone: 'T option -> option: 'T option -> 'T option
+union case Option.Some: Value: 'T -> Option<'T>
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Option.orElseWith ifNoneThunk option
+ + + Parameters: +
unit -> 'T option
+ -
+ A thunk that provides an alternate option when evaluated.
+
+ + + + option + + : + 'T option
+ -
+ The input option.
+
+ + + + Returns: + 'T option
+
+ The option if the option is Some, else the result of evaluating ifNoneThunk.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns option if it is |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Option.toArray option
+ + + Parameters: +
'T option
+ -
+ The input option.
+
+ + + + Returns: + 'T[]
+
+ The result array.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
+ Example +++
+union case Option.None: Option<'T>
+Multiple items
+val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = + int type 'T option = Option<'T>
+module Option
+
+from Microsoft.FSharp.Core
+val toArray: option: 'T option -> 'T array
+union case Option.Some: Value: 'T -> Option<'T>
+
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+union case Option.None: Option<'T>
+Multiple items
+val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = + int type 'T option = Option<'T>
+module Option
+
+from Microsoft.FSharp.Core
+val toList: option: 'T option -> 'T list
+union case Option.Some: Value: 'T -> Option<'T>
+
+
+
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+union case Option.None: Option<'T>
+Multiple items
+val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = + int type 'T option = Option<'T>
+module Option
+
+from Microsoft.FSharp.Core
+val toNullable: option: 'T option -> System.Nullable<'T> (requires default constructor and value type and 'T :> System.ValueType)
+union case Option.Some: Value: 'T -> Option<'T>
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Option.toObj value
+ + + Parameters: +
'T option
+ -
+ The input value.
+
+ + + + Returns: + 'T
+
+ The result value, which is null if the input was None.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
+ Example +++
+union case Option.None: Option<'T>
+Multiple items
+val string: value: 'T -> string -------------------- type string = System.String type 'T option = Option<'T>
+module Option
+
+from Microsoft.FSharp.Core
+val toObj: value: 'T option -> 'T (requires 'T: null)
+union case Option.Some: Value: 'T -> Option<'T>
+
+
+
+ |
+
+ Represents a out-argument managed pointer in F# code. This type should only be used with F# 4.5+. +
++ Type of a formatting expression. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ PrintfFormat(value, captures, captureTys)
+ + + Parameters: +
string
+ -
+ The input string.
+
+ + + + captures + + : + obj[]
+ -
+ The captured expressions in an interpolated string.
+
+ + + + captureTys + + : + Type[]
+ -
+ The types of expressions for %A expression gaps in interpolated string.
+
+ + + + Returns: + PrintfFormat<'Printer, 'State, 'Residue, 'Result>
+
+ The PrintfFormat containing the formatted result.
+ + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ PrintfFormat(value)
+ + + Parameters: +
string
+ -
+ The input string.
+
+ + + + Returns: + PrintfFormat<'Printer, 'State, 'Residue, 'Result>
+
+ The PrintfFormat containing the formatted result.
+ + |
+
+
+
+ + ++
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+ Type of a formatting expression. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ PrintfFormat(value, captures, captureTys)
+ + + Parameters: +
string
+ -
+ The input string.
+
+ + + + captures + + : + obj[]
+ -
+ The captured expressions in an interpolated string.
+
+ + + + captureTys + + : + Type[]
+ -
+ The types of expressions for %A expression gaps in interpolated string.
+
+ + + + Returns: + PrintfFormat<'Printer, 'State, 'Residue, 'Result, 'Tuple>
+
+ The created format string.
+ + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ PrintfFormat(value)
+ + + Parameters: +
string
+ -
+ The input string.
+
+ + + + Returns: + PrintfFormat<'Printer, 'State, 'Residue, 'Result, 'Tuple>
+
+ The created format string.
+ + |
+
+
+
+ + ++
|
+
+ Represents a statically-analyzed format associated with writing to a StringBuilder. The type parameter indicates the + arguments and return type of the format operation. +
++ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+ Represents a statically-analyzed format associated with writing to a StringBuilder. The first type parameter indicates the + arguments of the format operation and the last the overall return type. +
++ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+ Represents a statically-analyzed format when formatting builds a string. The type parameter indicates the + arguments and return type of the format operation. +
++ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+ Represents a statically-analyzed format when formatting builds a string. The first type parameter indicates the + arguments of the format operation and the last the overall return type. +
++ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+ Represents a statically-analyzed format associated with writing to a TextWriter. The type parameter indicates the + arguments and return type of the format operation. +
++ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+ Represents a statically-analyzed format associated with writing to a TextWriter. The first type parameter indicates the + arguments of the format operation and the last the overall return type. +
++ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+ Extensible printf-style formatting for numbers and other datatypes +
+
+ Format specifications are strings with "%" markers indicating format
+ placeholders. Format placeholders consist of %[flags][width][.precision][type]
.
+
+ Type + | ++ Description + | +
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Represents a statically-analyzed format associated with writing to a StringBuilder. The first type parameter indicates the + arguments of the format operation and the last the overall return type. + + |
+
+ + + + BuilderFormat<'T> + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Represents a statically-analyzed format associated with writing to a StringBuilder. The type parameter indicates the + arguments and return type of the format operation. + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Represents a statically-analyzed format when formatting builds a string. The first type parameter indicates the + arguments of the format operation and the last the overall return type. + + |
+
+ + + + StringFormat<'T> + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Represents a statically-analyzed format when formatting builds a string. The type parameter indicates the + arguments and return type of the format operation. + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Represents a statically-analyzed format associated with writing to a TextWriter. The first type parameter indicates the + arguments of the format operation and the last the overall return type. + + |
+
+ + + + TextWriterFormat<'T> + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Represents a statically-analyzed format associated with writing to a TextWriter. The type parameter indicates the + arguments and return type of the format operation. + + |
+
+ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ bprintf builder format
+ + + Parameters: +
StringBuilder
+ -
+ The StringBuilder to print to.
+
+ + + + format + + : + BuilderFormat<'T>
+ -
+ The input format or interpolated string.
+
+ + + + Returns: + 'T
+
+ The return type and arguments of the formatter.
+ + |
+
+
+
+ + ++
+ Example +++ Using interpolated strings: +
+module Printf
+
+from Microsoft.FSharp.Core
+namespace System
+namespace System.Text
+val buffer: StringBuilder
+Multiple items
+type StringBuilder = + interface ISerializable + new: unit -> unit + 5 overloads + member Append: value: bool -> StringBuilder + 25 overloads + member AppendFormat: provider: IFormatProvider * format: string * arg0: obj -> StringBuilder + 12 overloads + member AppendJoin: separator: char * [<ParamArray>] values: obj array -> StringBuilder + 5 overloads + member AppendLine: unit -> StringBuilder + 3 overloads + member Clear: unit -> StringBuilder + member CopyTo: sourceIndex: int * destination: char array * destinationIndex: int * count: int -> unit + 1 overload + member EnsureCapacity: capacity: int -> int + member Equals: span: ReadOnlySpan<char> -> bool + 1 overload + ... <summary>Represents a mutable string of characters. This class cannot be inherited.</summary> -------------------- StringBuilder() : StringBuilder StringBuilder(capacity: int) : StringBuilder StringBuilder(value: string) : StringBuilder StringBuilder(capacity: int, maxCapacity: int) : StringBuilder StringBuilder(value: string, capacity: int) : StringBuilder StringBuilder(value: string, startIndex: int, length: int, capacity: int) : StringBuilder val bprintf: builder: StringBuilder -> format: BuilderFormat<'T> -> 'T
+StringBuilder.ToString() : string
+
+
+ Evaluates to StringBuilder.ToString(startIndex: int, length: int) : string "Write three = 3" .
+
+
+ + Example ++
+ Using
+module Printf
+
+from Microsoft.FSharp.Core
+namespace System
+namespace System.Text
+val buffer: StringBuilder
+Multiple items
+type StringBuilder = + interface ISerializable + new: unit -> unit + 5 overloads + member Append: value: bool -> StringBuilder + 25 overloads + member AppendFormat: provider: IFormatProvider * format: string * arg0: obj -> StringBuilder + 12 overloads + member AppendJoin: separator: char * [<ParamArray>] values: obj array -> StringBuilder + 5 overloads + member AppendLine: unit -> StringBuilder + 3 overloads + member Clear: unit -> StringBuilder + member CopyTo: sourceIndex: int * destination: char array * destinationIndex: int * count: int -> unit + 1 overload + member EnsureCapacity: capacity: int -> int + member Equals: span: ReadOnlySpan<char> -> bool + 1 overload + ... <summary>Represents a mutable string of characters. This class cannot be inherited.</summary> -------------------- StringBuilder() : StringBuilder StringBuilder(capacity: int) : StringBuilder StringBuilder(value: string) : StringBuilder StringBuilder(capacity: int, maxCapacity: int) : StringBuilder StringBuilder(value: string, capacity: int) : StringBuilder StringBuilder(value: string, startIndex: int, length: int, capacity: int) : StringBuilder val bprintf: builder: StringBuilder -> format: BuilderFormat<'T> -> 'T
+StringBuilder.ToString() : string
+
+
+ Evaluates to StringBuilder.ToString(startIndex: int, length: int) : string "Write five = 5" .
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ eprintf format
+ + + Parameters: +
TextWriterFormat<'T>
+ -
+ The input formatter.
+
+ + + + Returns: + 'T
+
+ The return type and arguments of the formatter.
+ + |
+
+
+
+ + ++
+ Example +++ Using interpolated strings: +
+val eprintf: format: Printf.TextWriterFormat<'T> -> 'T
+
+
+ After evaluation the text "Write three = 3" is written to stderr .
+
+
+ + Example ++
+ Using
+val eprintf: format: Printf.TextWriterFormat<'T> -> 'T
+
+
+ After evaluation the text "Write five = 5" is written to stderr .
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ eprintfn format
+ + + Parameters: +
TextWriterFormat<'T>
+ -
+ The input formatter.
+
+ + + + Returns: + 'T
+
+ The return type and arguments of the formatter.
+ + |
+
+
+
+ + ++
+ Example +++ Using interpolated strings: +
+val eprintfn: format: Printf.TextWriterFormat<'T> -> 'T
+
+
+ After evaluation two lines are written to stderr .
+
+
+ + Example ++
+ Using
+val eprintfn: format: Printf.TextWriterFormat<'T> -> 'T
+
+
+ After evaluation two lines are written to stderr .
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ failwithf format
+ + + Parameters: +
StringFormat<'T, 'Result>
+ -
+ The input formatter.
+
+ + + + Returns: + 'T
+
+ The arguments of the formatter.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Print to a string buffer and raise an exception with the given + result. Helper printers must return strings. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ fprintf textWriter format
+ + + Parameters: +
TextWriter
+ -
+ The TextWriter to print to.
+
+ + + + format + + : + TextWriterFormat<'T>
+ -
+ The input formatter.
+
+ + + + Returns: + 'T
+
+ The return type and arguments of the formatter.
+ + |
+
+
+
+ + ++
+ Example +++ Using interpolated strings: +
+module Printf
+
+from Microsoft.FSharp.Core
+namespace System
+namespace System.IO
+val file: StreamWriter
+type File =
+ static member AppendAllLines: path: string * contents: IEnumerable<string> -> unit + 1 overload
+ static member AppendAllLinesAsync: path: string * contents: IEnumerable<string> * encoding: Encoding * ?cancellationToken: CancellationToken -> Task + 1 overload
+ static member AppendAllText: path: string * contents: string -> unit + 1 overload
+ static member AppendAllTextAsync: path: string * contents: string * encoding: Encoding * ?cancellationToken: CancellationToken -> Task + 1 overload
+ static member AppendText: path: string -> StreamWriter
+ static member Copy: sourceFileName: string * destFileName: string -> unit + 1 overload
+ static member Create: path: string -> FileStream + 2 overloads
+ static member CreateSymbolicLink: path: string * pathToTarget: string -> FileSystemInfo
+ static member CreateText: path: string -> StreamWriter
+ static member Decrypt: path: string -> unit
+ ...
+<summary>Provides static methods for the creation, copying, deletion, moving, and opening of a single file, and aids in the creation of <see cref="T:System.IO.FileStream" /> objects.</summary> File.CreateText(path: string) : StreamWriter
+val fprintf: textWriter: TextWriter -> format: TextWriterFormat<'T> -> 'T
+StreamWriter.Close() : unit
+
+
+ After evaluation the file contains the text "Write three = 3" .
+
+
+ + Example ++
+ Using
+module Printf
+
+from Microsoft.FSharp.Core
+namespace System
+namespace System.IO
+val file: StreamWriter
+type File =
+ static member AppendAllLines: path: string * contents: IEnumerable<string> -> unit + 1 overload
+ static member AppendAllLinesAsync: path: string * contents: IEnumerable<string> * encoding: Encoding * ?cancellationToken: CancellationToken -> Task + 1 overload
+ static member AppendAllText: path: string * contents: string -> unit + 1 overload
+ static member AppendAllTextAsync: path: string * contents: string * encoding: Encoding * ?cancellationToken: CancellationToken -> Task + 1 overload
+ static member AppendText: path: string -> StreamWriter
+ static member Copy: sourceFileName: string * destFileName: string -> unit + 1 overload
+ static member Create: path: string -> FileStream + 2 overloads
+ static member CreateSymbolicLink: path: string * pathToTarget: string -> FileSystemInfo
+ static member CreateText: path: string -> StreamWriter
+ static member Decrypt: path: string -> unit
+ ...
+<summary>Provides static methods for the creation, copying, deletion, moving, and opening of a single file, and aids in the creation of <see cref="T:System.IO.FileStream" /> objects.</summary> File.CreateText(path: string) : StreamWriter
+val fprintf: textWriter: TextWriter -> format: TextWriterFormat<'T> -> 'T
+StreamWriter.Close() : unit
+
+
+ After evaluation the file contains the text "Write five = 5" .
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ fprintfn textWriter format
+ + + Parameters: +
TextWriter
+ -
+ The TextWriter to print to.
+
+ + + + format + + : + TextWriterFormat<'T>
+ -
+ The input formatter.
+
+ + + + Returns: + 'T
+
+ The return type and arguments of the formatter.
+ + |
+
+
+
+ + ++
+ Example +++ Using interpolated strings: +
+module Printf
+
+from Microsoft.FSharp.Core
+namespace System
+namespace System.IO
+val file: StreamWriter
+type File =
+ static member AppendAllLines: path: string * contents: IEnumerable<string> -> unit + 1 overload
+ static member AppendAllLinesAsync: path: string * contents: IEnumerable<string> * encoding: Encoding * ?cancellationToken: CancellationToken -> Task + 1 overload
+ static member AppendAllText: path: string * contents: string -> unit + 1 overload
+ static member AppendAllTextAsync: path: string * contents: string * encoding: Encoding * ?cancellationToken: CancellationToken -> Task + 1 overload
+ static member AppendText: path: string -> StreamWriter
+ static member Copy: sourceFileName: string * destFileName: string -> unit + 1 overload
+ static member Create: path: string -> FileStream + 2 overloads
+ static member CreateSymbolicLink: path: string * pathToTarget: string -> FileSystemInfo
+ static member CreateText: path: string -> StreamWriter
+ static member Decrypt: path: string -> unit
+ ...
+<summary>Provides static methods for the creation, copying, deletion, moving, and opening of a single file, and aids in the creation of <see cref="T:System.IO.FileStream" /> objects.</summary> File.CreateText(path: string) : StreamWriter
+val fprintfn: textWriter: TextWriter -> format: TextWriterFormat<'T> -> 'T
+StreamWriter.Close() : unit
+
+
+ After evaluation the file contains two lines.
+
+
+ + Example ++
+ Using
+module Printf
+
+from Microsoft.FSharp.Core
+namespace System
+namespace System.IO
+val file: StreamWriter
+type File =
+ static member AppendAllLines: path: string * contents: IEnumerable<string> -> unit + 1 overload
+ static member AppendAllLinesAsync: path: string * contents: IEnumerable<string> * encoding: Encoding * ?cancellationToken: CancellationToken -> Task + 1 overload
+ static member AppendAllText: path: string * contents: string -> unit + 1 overload
+ static member AppendAllTextAsync: path: string * contents: string * encoding: Encoding * ?cancellationToken: CancellationToken -> Task + 1 overload
+ static member AppendText: path: string -> StreamWriter
+ static member Copy: sourceFileName: string * destFileName: string -> unit + 1 overload
+ static member Create: path: string -> FileStream + 2 overloads
+ static member CreateSymbolicLink: path: string * pathToTarget: string -> FileSystemInfo
+ static member CreateText: path: string -> StreamWriter
+ static member Decrypt: path: string -> unit
+ ...
+<summary>Provides static methods for the creation, copying, deletion, moving, and opening of a single file, and aids in the creation of <see cref="T:System.IO.FileStream" /> objects.</summary> File.CreateText(path: string) : StreamWriter
+val fprintfn: textWriter: TextWriter -> format: TextWriterFormat<'T> -> 'T
+StreamWriter.Close() : unit
+
+
+ After evaluation the file contains two lines.
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ kbprintf continuation builder format
+ + + Parameters: +
unit -> 'Result
+ -
+ The function called after formatting to generate the format result.
+
+ + + + builder + + : + StringBuilder
+ -
+ The input StringBuilder.
+
+ + + + format + + : + BuilderFormat<'T, 'Result>
+ -
+ The input formatter.
+
+ + + + Returns: + 'T
+
+ The arguments of the formatter.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ bprintf, but call the given 'final' function to generate the result.
+ See |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ kfprintf continuation textWriter format
+ + + Parameters: +
unit -> 'Result
+ -
+ The function called after formatting to generate the format result.
+
+ + + + textWriter + + : + TextWriter
+ -
+ The input TextWriter.
+
+ + + + format + + : + TextWriterFormat<'T, 'Result>
+ -
+ The input formatter.
+
+ + + + Returns: + 'T
+
+ The arguments of the formatter.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ fprintf, but call the given 'final' function to generate the result.
+ See |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ kprintf continuation format
+ + + Parameters: +
string -> 'Result
+ -
+ The function called after formatting to generate the format result.
+
+ + + + format + + : + StringFormat<'T, 'Result>
+ -
+ The input formatter.
+
+ + + + Returns: + 'T
+
+ The arguments of the formatter.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + printf, but call the given 'final' function to generate the result. + For example, these let the printing force a flush after all output has + been entered onto the channel, but not before. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ksprintf continuation format
+ + + Parameters: +
string -> 'Result
+ -
+ The function called to generate a result from the formatted string.
+
+ + + + format + + : + StringFormat<'T, 'Result>
+ -
+ The input formatter.
+
+ + + + Returns: + 'T
+
+ The arguments of the formatter.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ sprintf, but call the given 'final' function to generate the result.
+ See |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ printf format
+ + + Parameters: +
TextWriterFormat<'T>
+ -
+ The input formatter.
+
+ + + + Returns: + 'T
+
+ The return type and arguments of the formatter.
+ + |
+
+
+
+ + ++
+ Example +++ Using interpolated strings: +
+val printf: format: Printf.TextWriterFormat<'T> -> 'T
+
+
+ After evaluation the text "Write three = 3" is written to stdout .
+
+
+ + Example ++
+ Using
+val printf: format: Printf.TextWriterFormat<'T> -> 'T
+
+
+ After evaluation the text "Write five = 5" is written to stdout .
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ printfn format
+ + + Parameters: +
TextWriterFormat<'T>
+ -
+ The input formatter.
+
+ + + + Returns: + 'T
+
+ The return type and arguments of the formatter.
+ + |
+
+
+
+ + ++
+ Example +++ Using interpolated strings: +
+val printfn: format: Printf.TextWriterFormat<'T> -> 'T
+
+
+ After evaluation the two lines are written to stdout .
+
+
+ + Example ++
+ Using
+val printfn: format: Printf.TextWriterFormat<'T> -> 'T
+
+
+ After evaluation the two lines are written to stdout .
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ sprintf format
+ + + Parameters: +
StringFormat<'T>
+ -
+ The input formatter.
+
+ + + + Returns: + 'T
+
+ The formatted string.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Print to a string via an internal string buffer and return + the result as a string. Helper printers must return strings. + + |
+
+ Indicates that, when a custom operator is used in a computation expression, + a parameter is automatically parameterized by the variable space of the computation expression +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ProjectionParameterAttribute()
+ + + + Returns: + ProjectionParameterAttribute
+
+ ProjectionParameterAttribute
+ + |
+
+
+
+ + ++
|
+
+ The type of mutable references. Use the functions [!] and [:=] to get and + set values of this type. +
++ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Value
+ + + |
+ + + | +
+ Adding this attribute to a record or union type disables the automatic generation + of overrides for 'System.Object.Equals(obj)', 'System.Object.GetHashCode()' + and 'System.IComparable' for the type. The type will by default use reference equality. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ReferenceEqualityAttribute()
+ + + + Returns: + ReferenceEqualityAttribute
+
+ ReferenceEqualityAttribute
+ + |
+
+
+
+ + ++
|
+
+ Adding this attribute to the let-binding for the definition of a top-level + value makes the quotation expression that implements the value available + for use at runtime. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ReflectedDefinitionAttribute(includeValue)
+ + + Parameters: +
bool
+ -
+ Indicates whether to include the evaluated value of the definition as the outer node of the quotation
+
+ + + + Returns: + ReflectedDefinitionAttribute
+
+ ReflectedDefinitionAttribute
+ + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ReflectedDefinitionAttribute()
+ + + + Returns: + ReflectedDefinitionAttribute
+
+ ReflectedDefinitionAttribute
+ + |
+
+
+
+ + ++
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+ This attribute is used to indicate that references to the elements of a module, record or union + type require explicit qualified access. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ RequireQualifiedAccessAttribute()
+ + + + Returns: + RequireQualifiedAccessAttribute
+
+ RequireQualifiedAccessAttribute
+ + |
+
+
+
+ + ++
|
+
+ Adding this attribute to a type, value or member requires that + uses of the construct must explicitly instantiate any generic type parameters. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ RequiresExplicitTypeArgumentsAttribute()
+ + + + Returns: + RequiresExplicitTypeArgumentsAttribute
+
+ RequiresExplicitTypeArgumentsAttribute
+ + |
+
+
+
+ + ++
|
+
+ Contains operations for working with values of type Result. +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ bind binder result
+ + + Parameters: +
'T -> Result<'U, 'TError>
+ -
+ A function that takes the value of type T from a result and transforms it into
+ a result containing a value of type U.
+
+ + + + result + + : + Result<'T, 'TError>
+ -
+ The input result.
+
+ + + + Returns: + Result<'U, 'TError>
+
+ A result of the output type of the binder.
+ + Modifiers: + inline + + Type parameters: + 'T, 'U, 'TError + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ contains value result
+ + + Parameters: +
'T
+ -
+ The value to test for equality.
+
+ + + + result + + : + Result<'T, 'Error>
+ -
+ The input result.
+
+ + + + Returns: + bool
+
+ True if the result is Ok and contains a value equal to value, otherwise false.
+ + Modifiers: + inline + + Type parameters: + 'T, 'Error + |
+
+
+
+ + ++
+ Example +++
+union case Result.Error: ErrorValue: 'TError -> Result<'T,'TError>
+Multiple items
+module Result + +from Microsoft.FSharp.Core -------------------- [<Struct>] +type Result<'T,'TError> = + | Ok of ResultValue: 'T + | Error of ErrorValue: 'TError val contains: value: 'T -> result: Result<'T,'Error> -> bool (requires equality)
+union case Result.Ok: ResultValue: 'T -> Result<'T,'TError>
+
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+union case Result.Error: ErrorValue: 'TError -> Result<'T,'TError>
+Multiple items
+module Result + +from Microsoft.FSharp.Core -------------------- [<Struct>] +type Result<'T,'TError> = + | Ok of ResultValue: 'T + | Error of ErrorValue: 'TError val count: result: Result<'T,'Error> -> int
+union case Result.Ok: ResultValue: 'T -> Result<'T,'TError>
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ defaultValue value result
+ + + Parameters: +
'T
+ -
+ The specified default value.
+
+ + + + result + + : + Result<'T, 'Error>
+ -
+ The input result.
+
+ + + + Returns: + 'T
+
+ The result if the result is Ok, else the default value.
+ + Modifiers: + inline + + Type parameters: + 'T, 'Error + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Gets the value of the result if the result is |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ defaultWith defThunk result
+ + + Parameters: +
'Error -> 'T
+ -
+ A thunk that provides a default value when evaluated.
+
+ + + + result + + : + Result<'T, 'Error>
+ -
+ The input result.
+
+ + + + Returns: + 'T
+
+ The result if the result is Ok, else the result of evaluating defThunk.
+ + Modifiers: + inline + + Type parameters: + 'Error, 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Gets the value of the result if the result is |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ exists predicate result
+ + + Parameters: +
'T -> bool
+ -
+ A function that evaluates to a boolean when given a value from the result type.
+
+ + + + result + + : + Result<'T, 'Error>
+ -
+ The input result.
+
+ + + + Returns: + bool
+
+ False if the result is Error, otherwise it returns the result of applying the predicate
+ to the result value.
+ + Modifiers: + inline + + Type parameters: + 'T, 'Error + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ fold folder state result
+ + + Parameters: +
'State -> 'T -> 'State
+ -
+ A function to update the state data when given a value from an result.
+
+ + + + state + + : + 'State
+ -
+ The initial state.
+
+ + + + result + + : + Result<'T, 'Error>
+ -
+ The input result.
+
+ + + + Returns: + 'State
+
+ The original state if the result is Error, otherwise it returns the updated state with the folder
+ and the result value.
+ + Modifiers: + inline + + Type parameters: + 'T, 'Error, 'State + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ foldBack folder result state
+ + + Parameters: +
'T -> 'State -> 'State
+ -
+ A function to update the state data when given a value from an result.
+
+ + + + result + + : + Result<'T, 'Error>
+ -
+ The input result.
+
+ + + + state + + : + 'State
+ -
+ The initial state.
+
+ + + + Returns: + 'State
+
+ The original state if the result is Error, otherwise it returns the updated state with the folder
+ and the result value.
+ + Modifiers: + inline + + Type parameters: + 'T, 'Error, 'State + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ forall predicate result
+ + + Parameters: +
'T -> bool
+ -
+ A function that evaluates to a boolean when given a value from the result type.
+
+ + + + result + + : + Result<'T, 'Error>
+ -
+ The input result.
+
+ + + + Returns: + bool
+
+ True if the result is Error, otherwise it returns the result of applying the predicate
+ to the result value.
+ + Modifiers: + inline + + Type parameters: + 'T, 'Error + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+union case Result.Ok: ResultValue: 'T -> Result<'T,'TError>
+Multiple items
+module Result + +from Microsoft.FSharp.Core -------------------- [<Struct>] +type Result<'T,'TError> = + | Ok of ResultValue: 'T + | Error of ErrorValue: 'TError val isError: result: Result<'T,'Error> -> bool
+union case Result.Error: ErrorValue: 'TError -> Result<'T,'TError>
+
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+union case Result.Ok: ResultValue: 'T -> Result<'T,'TError>
+Multiple items
+module Result + +from Microsoft.FSharp.Core -------------------- [<Struct>] +type Result<'T,'TError> = + | Ok of ResultValue: 'T + | Error of ErrorValue: 'TError val isOk: result: Result<'T,'Error> -> bool
+union case Result.Error: ErrorValue: 'TError -> Result<'T,'TError>
+
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+union case Result.Error: ErrorValue: 'TError -> Result<'T,'TError>
+Multiple items
+module Result + +from Microsoft.FSharp.Core -------------------- [<Struct>] +type Result<'T,'TError> = + | Ok of ResultValue: 'T + | Error of ErrorValue: 'TError val iter: action: ('T -> unit) -> result: Result<'T,'Error> -> unit
+val printfn: format: Printf.TextWriterFormat<'T> -> 'T
+union case Result.Ok: ResultValue: 'T -> Result<'T,'TError>
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ map mapping result
+ + + Parameters: +
'T -> 'U
+ -
+ A function to apply to the OK result value.
+
+ + + + result + + : + Result<'T, 'TError>
+ -
+ The input result.
+
+ + + + Returns: + Result<'U, 'TError>
+
+ A result of the input value after applying the mapping function, or Error if the input is Error.
+ + Modifiers: + inline + + Type parameters: + 'T, 'U, 'TError + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ mapError mapping result
+ + + Parameters: +
'TError -> 'U
+ -
+ A function to apply to the Error result value.
+
+ + + + result + + : + Result<'T, 'TError>
+ -
+ The input result.
+
+ + + + Returns: + Result<'T, 'U>
+
+ A result of the error value after applying the mapping function, or Ok if the input is Ok.
+ + Modifiers: + inline + + Type parameters: + 'TError, 'U, 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ toArray result
+ + + Parameters: +
Result<'T, 'Error>
+ -
+ The input result.
+
+ + + + Returns: + 'T[]
+
+ The result array.
+ + Modifiers: + inline + + Type parameters: + 'T, 'Error + |
+
+
+
+ + ++
+ Example +++
+union case Result.Error: ErrorValue: 'TError -> Result<'T,'TError>
+Multiple items
+module Result + +from Microsoft.FSharp.Core -------------------- [<Struct>] +type Result<'T,'TError> = + | Ok of ResultValue: 'T + | Error of ErrorValue: 'TError val toArray: result: Result<'T,'Error> -> 'T array
+union case Result.Ok: ResultValue: 'T -> Result<'T,'TError>
+
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+union case Result.Error: ErrorValue: 'TError -> Result<'T,'TError>
+Multiple items
+module Result + +from Microsoft.FSharp.Core -------------------- [<Struct>] +type Result<'T,'TError> = + | Ok of ResultValue: 'T + | Error of ErrorValue: 'TError val toList: result: Result<'T,'Error> -> 'T list
+union case Result.Ok: ResultValue: 'T -> Result<'T,'TError>
+
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+union case Result.Error: ErrorValue: 'TError -> Result<'T,'TError>
+Multiple items
+module Result + +from Microsoft.FSharp.Core -------------------- [<Struct>] +type Result<'T,'TError> = + | Ok of ResultValue: 'T + | Error of ErrorValue: 'TError val toOption: result: Result<'T,'Error> -> 'T option
+union case Result.Ok: ResultValue: 'T -> Result<'T,'TError>
+
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+union case Result.Error: ErrorValue: 'TError -> Result<'T,'TError>
+Multiple items
+module Result + +from Microsoft.FSharp.Core -------------------- [<Struct>] +type Result<'T,'TError> = + | Ok of ResultValue: 'T + | Error of ErrorValue: 'TError val toOption: result: Result<'T,'Error> -> 'T option
+union case Result.Ok: ResultValue: 'T -> Result<'T,'TError>
+
+
+
+ |
+
+ The type of 8-bit signed integer numbers, annotated with a unit of measure. The unit + of measure is erased in compiled code and when values of this type + are analyzed using reflection. The type is representationally equivalent to + SByte. +
++ An abbreviation for the CLI type SByte. +
++ Adding this attribute to class definition makes it sealed, which means it may not + be extended or implemented. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ SealedAttribute(value)
+ + + Parameters: +
bool
+ -
+ Indicates whether the class is sealed.
+
+ + + + Returns: + SealedAttribute
+
+ SealedAttribute
+ + |
+
+
+
+ + ++
|
+
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+ The type of single-precision floating point numbers, annotated with a unit of measure. + The unit of measure is erased in compiled code and when values of this type + are analyzed using reflection. The type is representationally equivalent to + Single. +
++ Indicates the relationship between a compiled entity in a CLI binary and an element in F# source code. +
++ Record Field + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ + Indicates that the compiled entity is part of the representation of an F# closure. + + |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ + Indicates that the compiled entity is part of the representation of an F# exception declaration. + + |
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ + Indicates that the compiled entity is part of the representation of an F# record or union case field declaration. + + |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ + The mask of values related to the kind of the compiled entity. + + |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ + Indicates that the compiled entity is part of the representation of an F# module declaration. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ NonPublicRepresentation
+ + + + Field type: + SourceConstructFlags
+
+ + Modifiers: + static + + |
+
+
+
+
+
+ + Indicates that the compiled entity had private or internal representation in F# source code. + + |
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ + Indicates that the compiled entity has no relationship to an element in F# source code. + + |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ + Indicates that the compiled entity is part of the representation of an F# class or other object type declaration. + + |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ + Indicates that the compiled entity is part of the representation of an F# record type declaration. + + |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ + Indicates that the compiled entity is part of the representation of an F# union type declaration. + + |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ + Indicates that the compiled entity is part of the representation of an F# union case declaration. + + |
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ + Indicates that the compiled entity is part of the representation of an F# value declaration. + + |
+
+ Functional programming operators for string processing. Further string operations + are available via the member functions on strings and other functionality in + System.String + and System.Text.RegularExpressions types. + +
++ Function or value + | ++ Description + | +||
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Builds a new string whose characters are the results of applying the function |
+ ||
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ String.concat sep strings
+ + + Parameters: +
string
+ -
+ The separator string to be inserted between the strings
+ of the input sequence.
+
+ + + + strings + + : + string seq
+ -
+ The sequence of strings to be concatenated.
+
+ + + + Returns: + string
+
+ A new string consisting of the concatenated strings separated by
+ the separation string.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns a new string made by concatenating the given strings
+ with separator |
+
+ + ArgumentNullException + + | +
+ Thrown when strings is null.
+ |
+
+
let input1 = ["Stefan"; "says:"; "Hello"; "there!"]
+
+ input1 |> String.concat " " // evaluates "Stefan says: Hello there!"
+
+ let input2 = [0..9] |> List.map string
+
+ input2 |> String.concat "" // evaluates "0123456789"
+ input2 |> String.concat ", " // evaluates "0, 1, 2, 3, 4, 5, 6, 7, 8, 9"
+
+ let input3 = ["No comma"]
+
+ input3 |> String.concat "," // evaluates "No comma"
+
+
+
+
+ String.exists predicate str
+ char -> bool
+ -
+ The function to test each character of the string.
+
+ string
+ -
+ The input string.
+
+ bool
+
+ True if any character returns true for the predicate and false otherwise.
+ char -> bool
+ + The function to test each character of the string. +
+string
+ + The input string. +
+bool
+ + True if any character returns true for the predicate and false otherwise. +
++ Looking for uppercase characters +
open System
+
+ "Yoda" |> String.exists Char.IsUpper // evaluates true
+
+ "nope" |> String.exists Char.IsUpper // evaluates false
+
+
+
+
+ String.filter predicate str
+ char -> bool
+ -
+ A function to test whether each character in the input sequence should be included in the output string.
+
+ string
+ -
+ The input string.
+
+ string
+
+ The resulting string.
+ + Builds a new string containing only the characters of the input string + for which the given predicate returns "true". +
++ Returns an empty string if the input string is null +
+char -> bool
+ + A function to test whether each character in the input sequence should be included in the output string. +
+string
+ + The input string. +
+string
+ + The resulting string. +
++ Filtering out just alphanumeric characters +
open System
+
+ let input = "0 1 2 3 4 5 6 7 8 9 a A m M"
+
+ input |> String.filter Uri.IsHexDigit // evaluates "123456789aA"
+
++ Filtering out just digits +
open System
+
+ "hello" |> String.filter Char.IsDigit // evaluates ""
+
+
+
+
+ String.forall predicate str
+ char -> bool
+ -
+ The function to test each character of the string.
+
+ string
+ -
+ The input string.
+
+ bool
+
+ True if all characters return true for the predicate and false otherwise.
+ char -> bool
+ + The function to test each character of the string. +
+string
+ + The input string. +
+bool
+ + True if all characters return true for the predicate and false otherwise. +
++ Looking for lowercase characters +
open System
+
+ "all are lower" |> String.forall Char.IsLower // evaluates false
+
+ "allarelower" |> String.forall Char.IsLower // evaluates true
+
+
+
+
+ String.init count initializer
+ int
+ -
+ The number of strings to initialize.
+
+ int -> string
+ -
+ The function to take an index and produce a string to
+ be concatenated with the others.
+
+ string
+
+ The constructed string.
+
+ Builds a new string whose characters are the results of applying the function mapping
+ to each index from 0
to count-1
and concatenating the resulting
+ strings.
+
int
+ + The number of strings to initialize. +
+int -> string
+ + The function to take an index and produce a string to + be concatenated with the others. +
+string
+ + The constructed string. +
++ + ArgumentException + + | +
+ Thrown when count is negative.
+ |
+
+ Enumerate digits ASCII codes +
String.init 10 (fun i -> int '0' + i |> sprintf "%d ")
+
+"48 49 50 51 52 53 54 55 56 57 "
+
+
+
+
+
+ String.iter action str
+
+
+
+
+
+ char -> unit
+ + The function to be applied to each character of the string. +
+string
+ + The input string. +
++ Printing the ASCII code for each characater in the string +
let input = "Hello"
+ input |> String.iter (fun c -> printfn "%c %d" c (int c))
+
+unit
, but prints:
+ H 72
+ e 101
+ l 108
+ l 108
+ o 111
+
+
+
+
+
+ Applies the function action
to the index of each character in the string and the
+ character itself.
+
int -> char -> unit
+ + The function to apply to each character and index of the string. +
+string
+ + The input string. +
++ Numbering the characters and printing the associated ASCII code + for each characater in the input string +
let input = "Hello"
+ input |> String.iteri (fun i c -> printfn "%d. %c %d" (i + 1) c (int c))
+
+unit
, but prints:
+ 1. H 72
+ 2. e 101
+ 3. l 108
+ 4. l 108
+ 5. o 111
+
+
+
+
+
+
+
+
+ String.length str
+
+
+
+
+
+ string
+ + The input string. +
+int
+ + The number of characters in the string. +
++ Getting the length of different strings +
String.length null // evaluates 0
+ String.length "" // evaluates 0
+ String.length "123" // evaluates 3
+
+
+
+
+
+ String.map mapping str
+
+
+
+
+
+
+ Builds a new string whose characters are the results of applying the function mapping
+ to each of the characters of the input string.
+
char -> char
+ + The function to apply to the characters of the string. +
+string
+ + The input string. +
+string
+ + The resulting string. +
++ Changing case to upper for all characters in the input string +
open System
+
+ let input = "Hello there!"
+
+ input |> String.map Char.ToUpper // evaluates "HELLO THERE!"
+
+
+
+
+
+ String.mapi mapping str
+
+
+
+
+
+
+ Builds a new string whose characters are the results of applying the function mapping
+ to each character and index of the input string.
+
int -> char -> char
+ + The function to apply to each character and index of the string. +
+string
+ + The input string. +
+string
+ + The resulting string. +
++
input |> String.mapi (fun i c -> (i, c))
+
+[ (0, 'O'); (1, 'K'); (2, '!') ]
.
+
+
+
+
+
+
+ int
+ + The number of copies of the input string will be copied. +
+string
+ + The input string. +
+string
+ + The concatenated string. +
++ + ArgumentException + + | +
+ Thrown when count is negative.
+ |
+
+
"Do it!" |> String.replicate 3
+
+"Do it!Do it!Do it!"
.
+
+
+ + Adding this attribute to a type causes it to be represented using a CLI struct. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
|
+
+ Adding this attribute to a record, union, exception, or struct type confirms the + automatic generation of implementations for 'System.IComparable' for the type. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ StructuralComparisonAttribute()
+ + + + Returns: + StructuralComparisonAttribute
+
+ StructuralComparisonAttribute
+ + |
+
+
+
+ + ++
|
+
+ Adding this attribute to a record, union or struct type confirms the automatic + generation of overrides for 'System.Object.Equals(obj)' and + 'System.Object.GetHashCode()' for the type. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ StructuralEqualityAttribute()
+ + + + Returns: + StructuralEqualityAttribute
+
+ StructuralEqualityAttribute
+ + |
+
+
+
+ + ++
|
+
+ This attribute is used to mark how a type is displayed by default when using
+ '%A' printf formatting patterns and other two-dimensional text-based display layouts.
+ In this version of F# valid values are of the form PreText {PropertyName1} PostText {PropertyName2} ... {PropertyNameX} PostText
.
+ The property names indicate properties to evaluate and to display instead of the object itself.
+
+ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ StructuredFormatDisplayAttribute(value)
+ + + Parameters: +
string
+ -
+ Indicates the text to display when using the '%A' printf formatting.
+
+ + + + Returns: + StructuredFormatDisplayAttribute
+
+ StructuredFormatDisplayAttribute
+ + |
+
+
+
+ + ++
|
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+ Indicates a function that should be called in a tail recursive way inside its recursive scope. + A warning is emitted if the function is analyzed as not tail recursive after the optimization phase. +
++
let mul x y = x * y
+ [<TailCall>]
+ let rec fact n acc =
+ if n = 0
+ then acc
+ else (fact (n - 1) (mul n acc)) + 23 // warning because of the addition after the call to fact
+
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
|
+
+ The type of 32-bit unsigned integer numbers, annotated with a unit of measure. + The unit of measure is erased in compiled code and when values of this type + are analyzed using reflection. The type is representationally equivalent to + UInt32. +
++ An abbreviation for the CLI type UInt32. +
++ The type of 16-bit unsigned integer numbers, annotated with a unit of measure. + The unit of measure is erased in compiled code and when values of this type + are analyzed using reflection. The type is representationally equivalent to + UInt16. +
++ An abbreviation for the CLI type UInt16. +
++ The type of 32-bit unsigned integer numbers, annotated with a unit of measure. + The unit of measure is erased in compiled code and when values of this type + are analyzed using reflection. The type is representationally equivalent to + UInt32. +
++ An abbreviation for the CLI type UInt32. +
++ The type of 64-bit unsigned integer numbers, annotated with a unit of measure. + The unit of measure is erased in compiled code and when values of this type + are analyzed using reflection. The type is representationally equivalent to + UInt64. +
++ An abbreviation for the CLI type UInt64. +
++ The type of 8-bit unsigned integer numbers, annotated with a unit of measure. + The unit of measure is erased in compiled code and when values of this type + are analyzed using reflection. The type is representationally equivalent to + Byte. +
++ An abbreviation for the CLI type Byte. +
++ The type of machine-sized unsigned integer numbers, annotated with a unit of measure. + The unit of measure is erased in compiled code and when values of this type + are analyzed using reflection. The type is representationally equivalent to + UIntPtr. +
++ The type 'unit', which has only one value "()". This value is special and + always uses the representation 'null'. +
++ This attribute is used to tag values whose use will result in the generation + of unverifiable code. These values are inevitably marked 'inline' to ensure that + the unverifiable constructs are not present in the actual code for the F# library, + but are rather copied to the source code of the caller. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ UnverifiableAttribute()
+ + + + Returns: + UnverifiableAttribute
+
+ UnverifiableAttribute
+ + |
+
+
+
+ + ++
|
+
+ Contains operations for working with value options. +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ValueOption.bind binder voption
+ + + Parameters: +
'T -> 'U voption
+ -
+ A function that takes the value of type T from a value option and transforms it into
+ a value option containing a value of type U.
+
+ + + + voption + + : + 'T voption
+ -
+ The input value option.
+
+ + + + Returns: + 'U voption
+
+ An option of the output type of the binder.
+ + Modifiers: + inline + + Type parameters: + 'T, 'U + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ValueOption.contains value voption
+ + + Parameters: +
'T
+ -
+ The value to test for equality.
+
+ + + + voption + + : + 'T voption
+ -
+ The input value option.
+
+ + + + Returns: + bool
+
+ True if the option is ValueSome and contains a value equal to value, otherwise false.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Evaluates to true if voption is |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ValueOption.defaultValue value voption
+ + + Parameters: +
'T
+ -
+ The specified default value.
+
+ + + + voption + + : + 'T voption
+ -
+ The input voption.
+
+ + + + Returns: + 'T
+
+ The voption if the voption is ValueSome, else the default value.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Gets the value of the value option if the option is |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ValueOption.defaultWith defThunk voption
+ + + Parameters: +
unit -> 'T
+ -
+ A thunk that provides a default value when evaluated.
+
+ + + + voption + + : + 'T voption
+ -
+ The input voption.
+
+ + + + Returns: + 'T
+
+ The voption if the voption is ValueSome, else the result of evaluating defThunk.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Gets the value of the voption if the voption is |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ValueOption.exists predicate voption
+ + + Parameters: +
'T -> bool
+ -
+ A function that evaluates to a boolean when given a value from the option type.
+
+ + + + voption + + : + 'T voption
+ -
+ The input value option.
+
+ + + + Returns: + bool
+
+ False if the option is ValueNone, otherwise it returns the result of applying the predicate
+ to the option value.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ValueOption.filter predicate voption
+ + + Parameters: +
'T -> bool
+ -
+ A function that evaluates whether the value contained in the value option should remain, or be filtered out.
+
+ + + + voption + + : + 'T voption
+ -
+ The input value option.
+
+ + + + Returns: + 'T voption
+
+ The input if the predicate evaluates to true; otherwise, ValueNone.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ValueOption.fold folder state voption
+ + + Parameters: +
'State -> 'T -> 'State
+ -
+ A function to update the state data when given a value from a value option.
+
+ + + + state + + : + 'State
+ -
+ The initial state.
+
+ + + + voption + + : + 'T voption
+ -
+ The input value option.
+
+ + + + Returns: + 'State
+
+ The original state if the option is ValueNone, otherwise it returns the updated state with the folder
+ and the voption value.
+ + Modifiers: + inline + + Type parameters: + 'T, 'State + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ValueOption.foldBack folder voption state
+ + + Parameters: +
'T -> 'State -> 'State
+ -
+ A function to update the state data when given a value from a value option.
+
+ + + + voption + + : + 'T voption
+ -
+ The input value option.
+
+ + + + state + + : + 'State
+ -
+ The initial state.
+
+ + + + Returns: + 'State
+
+ The original state if the option is ValueNone, otherwise it returns the updated state with the folder
+ and the voption value.
+ + Modifiers: + inline + + Type parameters: + 'T, 'State + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ValueOption.forall predicate voption
+ + + Parameters: +
'T -> bool
+ -
+ A function that evaluates to a boolean when given a value from the value option type.
+
+ + + + voption + + : + 'T voption
+ -
+ The input value option.
+
+ + + + Returns: + bool
+
+ True if the option is None, otherwise it returns the result of applying the predicate
+ to the option value.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ValueOption.get voption
+ + + Parameters: +
'T voption
+ -
+ The input value option.
+
+ + + + Returns: + 'T
+
+ The value within the option.
+ + |
+
+
+
+ + ++
+ Example +++
+union case ValueOption.ValueSome: 'T -> ValueOption<'T>
+Multiple items
+module ValueOption + +from Microsoft.FSharp.Core -------------------- [<Struct>] +type ValueOption<'T> = + | ValueNone + | ValueSome of 'T + static member Some: value: 'T -> 'T voption + static member op_Implicit: value: 'T -> 'T voption + member IsNone: bool + member IsSome: bool + member Value: 'T + static member None: 'T voption val get: voption: 'T voption -> 'T
+union case ValueOption.ValueNone: ValueOption<'T>
+Multiple items
+
+
+
+ val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = + int |
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+union case ValueOption.ValueNone: ValueOption<'T>
+Multiple items
+module ValueOption + +from Microsoft.FSharp.Core -------------------- [<Struct>] +type ValueOption<'T> = + | ValueNone + | ValueSome of 'T + static member Some: value: 'T -> 'T voption + static member op_Implicit: value: 'T -> 'T voption + member IsNone: bool + member IsSome: bool + member Value: 'T + static member None: 'T voption val isNone: voption: 'T voption -> bool
+union case ValueOption.ValueSome: 'T -> ValueOption<'T>
+
+
+
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+union case ValueOption.ValueNone: ValueOption<'T>
+Multiple items
+module ValueOption + +from Microsoft.FSharp.Core -------------------- [<Struct>] +type ValueOption<'T> = + | ValueNone + | ValueSome of 'T + static member Some: value: 'T -> 'T voption + static member op_Implicit: value: 'T -> 'T voption + member IsNone: bool + member IsSome: bool + member Value: 'T + static member None: 'T voption val isSome: voption: 'T voption -> bool
+union case ValueOption.ValueSome: 'T -> ValueOption<'T>
+
+
+
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ValueOption.map mapping voption
+ + + Parameters: +
'T -> 'U
+ -
+ A function to apply to the voption value.
+
+ + + + voption + + : + 'T voption
+ -
+ The input value option.
+
+ + + + Returns: + 'U voption
+
+ A value option of the input value after applying the mapping function, or ValueNone if the input is ValueNone.
+ + Modifiers: + inline + + Type parameters: + 'T, 'U + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ValueOption.map2 mapping voption1 voption2
+ + + Parameters: +
'T1 -> 'T2 -> 'U
+ -
+ A function to apply to the voption values.
+
+ + + + voption1 + + : + 'T1 voption
+ -
+ The first value option.
+
+ + + + voption2 + + : + 'T2 voption
+ -
+ The second value option.
+
+ + + + Returns: + 'U voption
+
+ A value option of the input values after applying the mapping function, or ValueNone if either input is ValueNone.
+ + Modifiers: + inline + + Type parameters: + 'T1, 'T2, 'U + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ValueOption.map3 mapping voption1 voption2 voption3
+ + + Parameters: +
'T1 -> 'T2 -> 'T3 -> 'U
+ -
+ A function to apply to the value option values.
+
+ + + + voption1 + + : + 'T1 voption
+ -
+ The first value option.
+
+ + + + voption2 + + : + 'T2 voption
+ -
+ The second value option.
+
+ + + + voption3 + + : + 'T3 voption
+ -
+ The third value option.
+
+ + + + Returns: + 'U voption
+
+ A value option of the input values after applying the mapping function, or ValueNone if any input is ValueNone.
+ + Modifiers: + inline + + Type parameters: + 'T1, 'T2, 'T3, 'U + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+namespace System
+Multiple items
+[<Struct>] +type Nullable<'T (requires default constructor and value type and 'T :> ValueType)> = + new: value: 'T -> unit + member Equals: other: obj -> bool + member GetHashCode: unit -> int + member GetValueOrDefault: unit -> 'T + 1 overload + member ToString: unit -> string + static member op_Explicit: value: Nullable<'T> -> 'T + static member op_Implicit: value: 'T -> Nullable<'T> + member HasValue: bool + member Value: 'T <summary>Represents a value type that can be assigned <see langword="null" />.</summary> <typeparam name="T">The underlying value type of the <see cref="T:System.Nullable`1" /> generic type.</typeparam> -------------------- type Nullable = + static member Compare<'T (requires default constructor and value type and 'T :> ValueType)> : n1: Nullable<'T> * n2: Nullable<'T> -> int + static member Equals<'T (requires default constructor and value type and 'T :> ValueType)> : n1: Nullable<'T> * n2: Nullable<'T> -> bool + static member GetUnderlyingType: nullableType: Type -> Type + static member GetValueRefOrDefaultRef<'T (requires default constructor and value type and 'T :> ValueType)> : nullable: byref<Nullable<'T>> -> inref<'T> <summary>Supports a value type that can be assigned <see langword="null" />. This class cannot be inherited.</summary> -------------------- System.Nullable () System.Nullable(value: 'T) : System.Nullable<'T> Multiple items
+val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = + int Multiple items
+module ValueOption + +from Microsoft.FSharp.Core -------------------- [<Struct>] +type ValueOption<'T> = + | ValueNone + | ValueSome of 'T + static member Some: value: 'T -> 'T voption + static member op_Implicit: value: 'T -> 'T voption + member IsNone: bool + member IsSome: bool + member Value: 'T + static member None: 'T voption val ofNullable: value: System.Nullable<'T> -> 'T voption (requires default constructor and value type and 'T :> System.ValueType)
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ValueOption.ofObj value
+ + + Parameters: +
'T
+ -
+ The input value.
+
+ + + + Returns: + 'T voption
+
+ The result value option.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
+ Example +++
+Multiple items
+val string: value: 'T -> string -------------------- type string = System.String Multiple items
+module ValueOption + +from Microsoft.FSharp.Core -------------------- [<Struct>] +type ValueOption<'T> = + | ValueNone + | ValueSome of 'T + static member Some: value: 'T -> 'T voption + static member op_Implicit: value: 'T -> 'T voption + member IsNone: bool + member IsSome: bool + member Value: 'T + static member None: 'T voption val ofObj: value: 'T -> 'T voption (requires 'T: null)
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ValueOption.orElse ifNone voption
+ + + Parameters: +
'T voption
+ -
+ The value to use if voption is None .
+
+ + + + voption + + : + 'T voption
+ -
+ The input option.
+
+ + + + Returns: + 'T voption
+
+ The option if the option is Some, else the alternate option.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
+ Example +++
+union case ValueOption.ValueNone: ValueOption<'T>
+Multiple items
+val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = + int Multiple items
+module ValueOption + +from Microsoft.FSharp.Core -------------------- [<Struct>] +type ValueOption<'T> = + | ValueNone + | ValueSome of 'T + static member Some: value: 'T -> 'T voption + static member op_Implicit: value: 'T -> 'T voption + member IsNone: bool + member IsSome: bool + member Value: 'T + static member None: 'T voption val orElse: ifNone: 'T voption -> voption: 'T voption -> 'T voption
+union case ValueOption.ValueSome: 'T -> ValueOption<'T>
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ValueOption.orElseWith ifNoneThunk voption
+ + + Parameters: +
unit -> 'T voption
+ -
+ A thunk that provides an alternate value option when evaluated.
+
+ + + + voption + + : + 'T voption
+ -
+ The input value option.
+
+ + + + Returns: + 'T voption
+
+ The voption if the voption is ValueSome, else the result of evaluating ifNoneThunk.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns voption if it is |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ValueOption.toArray voption
+ + + Parameters: +
'T voption
+ -
+ The input value option.
+
+ + + + Returns: + 'T[]
+
+ The result array.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
+ Example +++
+union case ValueOption.ValueNone: ValueOption<'T>
+Multiple items
+val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = + int Multiple items
+module ValueOption + +from Microsoft.FSharp.Core -------------------- [<Struct>] +type ValueOption<'T> = + | ValueNone + | ValueSome of 'T + static member Some: value: 'T -> 'T voption + static member op_Implicit: value: 'T -> 'T voption + member IsNone: bool + member IsSome: bool + member Value: 'T + static member None: 'T voption val toArray: voption: 'T voption -> 'T array
+union case ValueOption.ValueSome: 'T -> ValueOption<'T>
+
+
+
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+union case ValueOption.ValueNone: ValueOption<'T>
+Multiple items
+val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = + int Multiple items
+module ValueOption + +from Microsoft.FSharp.Core -------------------- [<Struct>] +type ValueOption<'T> = + | ValueNone + | ValueSome of 'T + static member Some: value: 'T -> 'T voption + static member op_Implicit: value: 'T -> 'T voption + member IsNone: bool + member IsSome: bool + member Value: 'T + static member None: 'T voption val toList: voption: 'T voption -> 'T list
+union case ValueOption.ValueSome: 'T -> ValueOption<'T>
+
+
+
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+union case ValueOption.ValueNone: ValueOption<'T>
+Multiple items
+val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = + int Multiple items
+module ValueOption + +from Microsoft.FSharp.Core -------------------- [<Struct>] +type ValueOption<'T> = + | ValueNone + | ValueSome of 'T + static member Some: value: 'T -> 'T voption + static member op_Implicit: value: 'T -> 'T voption + member IsNone: bool + member IsSome: bool + member Value: 'T + static member None: 'T voption val toNullable: voption: 'T voption -> System.Nullable<'T> (requires default constructor and value type and 'T :> System.ValueType)
+union case ValueOption.ValueSome: 'T -> ValueOption<'T>
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ValueOption.toObj value
+ + + Parameters: +
'T voption
+ -
+ The input value.
+
+ + + + Returns: + 'T
+
+ The result value, which is null if the input was ValueNone.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+ + ++
+ Example +++
+union case ValueOption.ValueNone: ValueOption<'T>
+Multiple items
+val string: value: 'T -> string -------------------- type string = System.String Multiple items
+module ValueOption + +from Microsoft.FSharp.Core -------------------- [<Struct>] +type ValueOption<'T> = + | ValueNone + | ValueSome of 'T + static member Some: value: 'T -> 'T voption + static member op_Implicit: value: 'T -> 'T voption + member IsNone: bool + member IsSome: bool + member Value: 'T + static member None: 'T voption val toObj: value: 'T voption -> 'T (requires 'T: null)
+union case ValueOption.ValueSome: 'T -> ValueOption<'T>
+
+
+
+ |
+
+ Represents an untyped unmanaged pointer in F# code. +
+
+ This type should only be used when writing F# code that interoperates
+ with native code. Use of this type in F# code may result in
+ unverifiable code being generated. Conversions to and from the
+ nativeint type may be required. Values of this type can be generated
+ by the functions in the NativeInterop.NativePtr
module.
+
+ Adding this attribute to an F# mutable binding causes the "volatile" + prefix to be used for all accesses to the field. +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ VolatileFieldAttribute()
+ + + + Returns: + VolatileFieldAttribute
+
+ VolatileFieldAttribute
+ + |
+
+
+
+ + ++
|
+
+ The type of optional values, represented as structs. +
+
+ Use the constructors ValueSome
and ValueNone
to create values of this type.
+ Use the values in the ValueOption
module to manipulate values of this type,
+ or pattern match against the values directly.
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Value
+ + + + Returns: + 'T
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Get the value of a 'ValueSome' option. An InvalidOperationException is raised if the option is 'ValueNone'. + + |
+
+ + Basic definitions of operators, options, functions, results, choices, attributes and plain text formatting. + +
++ Type + | ++ Description + | +
+ + + + 'T array + + + + |
+ + + | +
+ + | ++ + | +
+ + | ++ + | +
+ + | ++ + | +
+ + + + double + + + + |
+ + + | +
+ + | ++ + | +
+ + + + float32 + + + + |
+ + + | +
+ + | ++ + | +
+ + | ++ + | +
+ + | ++ + | +
+ + | ++ + | +
+ + | ++ + | +
+ + | ++ + | +
+ + + + 'T ref + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + The type of mutable references. Use the functions [!] and [:=] to get and + set values of this type. + + |
+
+ + | ++ + | +
+ + + + single + + + + |
+ + + | +
+ + | ++ + | +
+ + + + uint16 + + + + |
+ + + | +
+ + + + uint32 + + + + |
+ + + | +
+ + + + uint64 + + + + |
+ + + | +
+ + | ++ + | +
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + The type 'unit', which has only one value "()". This value is special and + always uses the representation 'null'. + + |
+
+ Modules + | ++ Description + | +
+ + + + ExtraTopLevelOperators + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A set of extra operators and functions. This module is automatically opened in all F# code. + + |
+
+ + + + Operators + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Basic F# Operators. This module is automatically opened in all F# code. + + |
+
+ Type/Module + | ++ Description + | +
+ + + + Option + + + + |
+ + + | +
+ + + + 'T option + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The type of optional values. When used from other CLI languages the
+ empty option is the |
+
+ + + + ValueOption + + + + |
+ + + | +
+ + + + 'T voption + + + + |
+ + + | +
+ Modules + | ++ Description + | +
+ + + + Printf + + + + |
+ + + | +
+ + + + String + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Functional programming operators for string processing. Further string operations + are available via the member functions on strings and other functionality in + System.String + and System.Text.RegularExpressions types. + + + |
+
+ Type/Module + | ++ Description + | +
+ + + + Choice<'T1, 'T2> + + + + |
+ + + | +
+ + + + Choice<'T1, 'T2, 'T3> + + + + |
+ + + | +
+ + | ++ + | +
+ + | ++ + | +
+ + | ++ + | +
+ + | ++ + | +
+ + + + Result + + + + |
+ + + | +
+ + + + Result<'T, 'TError> + + + + |
+ + + | +
+ Type + | ++ Description + | +
+ + + + byte<'Measure> + + + + |
+ + + | +
+ + + + decimal<'Measure> + + + + |
+ + + | +
+ + + + double<'Measure> + + + + |
+ + + | +
+ + + + float<'Measure> + + + + |
+ + + | +
+ + + + float32<'Measure> + + + + |
+ + + | +
+ + + + int<'Measure> + + + + |
+ + + | +
+ + + + int16<'Measure> + + + + |
+ + + | +
+ + + + int32<'Measure> + + + + |
+ + + | +
+ + + + int64<'Measure> + + + + |
+ + + | +
+ + + + int8<'Measure> + + + + |
+ + + | +
+ + + + nativeint<'Measure> + + + + |
+ + + | +
+ + + + sbyte<'Measure> + + + + |
+ + + | +
+ + + + single<'Measure> + + + + |
+ + + | +
+ + + + uint<'Measure> + + + + |
+ + + | +
+ + + + uint16<'Measure> + + + + |
+ + + | +
+ + + + uint32<'Measure> + + + + |
+ + + | +
+ + + + uint64<'Measure> + + + + |
+ + + | +
+ + + + uint8<'Measure> + + + + |
+ + + | +
+ + + + unativeint<'Measure> + + + + |
+ + + | +
+ Type/Module + | ++ Description + | +
+ + + + byref<'T> + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Represents a managed pointer in F# code. For F# 4.5+ this is considered equivalent to |
+
+ + + + byref<'T, 'Kind> + + + + |
+ + + | +
+ + + + ByRefKinds + + + + |
+ + + | +
+ + + + ilsigptr<'T> + + + + |
+ + + | +
+ + + + inref<'T> + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Represents a in-argument or readonly managed pointer in F# code. This type should only be used with F# 4.5+. + + |
+
+ + + + nativeptr<'T> + + + + |
+ + + | +
+ + + + outref<'T> + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Represents a out-argument managed pointer in F# code. This type should only be used with F# 4.5+. + + |
+
+ + + + voidptr + + + + |
+ + + | +
+ Type + | ++ Description + | +
+ + + + AbstractClassAttribute + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Adding this attribute to class definition makes it abstract, which means it need not + implement all its methods. Instances of abstract classes may not be constructed directly. + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Adding this attribute to a type lets the 'null' literal be used for the type + within F# code. This attribute may only be added to F#-defined class or + interface types. + + |
+
+ + + + AutoOpenAttribute + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Indicates a construct is automatically opened when brought into scope through + an assembly reference or then opening of the containing namespace or module. + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Adding this attribute to a type with value 'false' disables the behaviour where F# makes the + type Serializable by default. + + |
+
+ + + + ClassAttribute + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Adding this attribute to a type causes it to be represented using a CLI class. + + |
+
+ + + + CLIEventAttribute + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Adding this attribute to a property with event type causes it to be compiled with as a CLI + metadata event, through a syntactic translation to a pair of 'add_EventName' and + 'remove_EventName' methods. + + |
+
+ + + + CLIMutableAttribute + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Adding this attribute to a record type causes it to be compiled to a CLI representation + with a default constructor with property getters and setters. + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + This attribute is used to indicate a generic container type satisfies the F# 'comparison' + constraint only if a generic argument also satisfies this constraint. + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + This attribute is generated automatically by the F# compiler to tag functions and members + that accept a partial application of some of their arguments and return a residual function. + + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + This attribute is inserted automatically by the F# compiler to tag types + and methods in the generated CLI code with flags indicating the correspondence + with original source constructs. + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This attribute is used to adjust the runtime representation for a type.
+ For example, it may be used to note that the |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Indicates one or more adjustments to the compiled representation of an F# type or member. + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + This attribute is inserted automatically by the F# compiler to tag + methods which are given the 'CompiledName' attribute. + + |
+
+ + + + CompiledNameAttribute + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Adding this attribute to a value or function definition in an F# module changes the name used + for the value in compiled CLI code. + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Indicates that a message should be emitted when F# source code uses this construct. + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Adding this attribute to a type indicates it is a type with a user-defined implementation of comparison. + + |
+
+ + + + CustomEqualityAttribute + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Adding this attribute to a type indicates it is a type with a user-defined implementation of equality. + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Indicates that a member on a computation builder type is a custom query operator, + and indicates the name of that operator. + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Adding this attribute to a discriminated union with value false + turns off the generation of standard helper member tester, constructor + and accessor members for the generated CLI class for that type. + + |
+
+ + + + DefaultValueAttribute + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Adding this attribute to a field declaration means that the field is + not initialized. During type checking a constraint is asserted that the field type supports 'null'. + If the 'check' value is false then the constraint is not asserted. + + + |
+
+ + + + EntryPointAttribute + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Adding this attribute to a function indicates it is the entrypoint for an application. + If this attribute is not specified for an EXE then the initialization implicit in the + module bindings in the last file in the compilation sequence are used as the entrypoint. + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + This attribute is used to indicate a generic container type satisfies the F# 'equality' + constraint only if a generic argument also satisfies this constraint. + + |
+
+ + + + ExperimentalAttribute + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + This attribute is used to tag values that are part of an experimental library + feature. + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + This attribute is added to generated assemblies to indicate the + version of the data schema used to encode additional F# + specific information in the resource attached to compiled F# libraries. + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Adding this attribute to a non-function value with generic parameters indicates that + uses of the construct can give rise to generic code through type inference. + + |
+
+ + + + InlineIfLambdaAttribute + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Adding this attribute to a parameter of function type indicates that, if the overall function or method is inlined and the parameter is + determined to be a known lambda, then this function should be statically inlined throughout the body of the function of method. + + |
+
+ + + + InterfaceAttribute + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Adding this attribute to a type causes it to be represented using a CLI interface. + + |
+
+ + + + LiteralAttribute + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Adding this attribute to a value causes it to be compiled as a CLI constant literal. + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Adding this attribute to a type causes it to be interpreted as a refined type, currently limited to measure-parameterized types. + This may only be used under very limited conditions. + + |
+
+ + + + MeasureAttribute + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Adding this attribute to a type causes it to be interpreted as a unit of measure. + This may only be used under very limited conditions. + + |
+
+ + + + NoComparisonAttribute + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Adding this attribute to a type indicates it is a type where comparison is an abnormal operation. + This means that the type does not satisfy the F# 'comparison' constraint. Within the bounds of the + F# type system, this helps ensure that the F# generic comparison function is not instantiated directly + at this type. The attribute and checking does not constrain the use of comparison with base or child + types of this type. + + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Indicates a value or a function that must not be inlined by the F# compiler, + but may be inlined by the JIT compiler. + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + This attribute is used to tag values that may not be dynamically invoked at runtime. This is + typically added to inlined functions whose implementations include unverifiable code. It + causes the method body emitted for the inlined function to raise an exception if + dynamically invoked, rather than including the unverifiable code in the generated + assembly. + + |
+
+ + + + NoEqualityAttribute + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Adding this attribute to a type indicates it is a type where equality is an abnormal operation. + This means that the type does not satisfy the F# 'equality' constraint. Within the bounds of the + F# type system, this helps ensure that the F# generic equality function is not instantiated directly + at this type. The attribute and checking does not constrain the use of comparison with base or child + types of this type. + + |
+
+ + | ++ + | +
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Indicates that, when a custom operator is used in a computation expression, + a parameter is automatically parameterized by the variable space of the computation expression + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Adding this attribute to a record or union type disables the automatic generation + of overrides for 'System.Object.Equals(obj)', 'System.Object.GetHashCode()' + and 'System.IComparable' for the type. The type will by default use reference equality. + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Adding this attribute to the let-binding for the definition of a top-level + value makes the quotation expression that implements the value available + for use at runtime. + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + This attribute is used to indicate that references to the elements of a module, record or union + type require explicit qualified access. + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Adding this attribute to a type, value or member requires that + uses of the construct must explicitly instantiate any generic type parameters. + + |
+
+ + + + SealedAttribute + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Adding this attribute to class definition makes it sealed, which means it may not + be extended or implemented. + + |
+
+ + + + SourceConstructFlags + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Indicates the relationship between a compiled entity in a CLI binary and an element in F# source code. + + |
+
+ + + + StructAttribute + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Adding this attribute to a type causes it to be represented using a CLI struct. + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Adding this attribute to a record, union, exception, or struct type confirms the + automatic generation of implementations for 'System.IComparable' for the type. + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Adding this attribute to a record, union or struct type confirms the automatic + generation of overrides for 'System.Object.Equals(obj)' and + 'System.Object.GetHashCode()' for the type. + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This attribute is used to mark how a type is displayed by default when using
+ '%A' printf formatting patterns and other two-dimensional text-based display layouts.
+ In this version of F# valid values are of the form |
+
+ + + + TailCallAttribute + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Indicates a function that should be called in a tail recursive way inside its recursive scope. + A warning is emitted if the function is analyzed as not tail recursive after the optimization phase. + + |
+
+ + + + UnverifiableAttribute + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + This attribute is used to tag values whose use will result in the generation + of unverifiable code. These values are inevitably marked 'inline' to ensure that + the unverifiable constructs are not present in the actual code for the F# library, + but are rather copied to the source code of the caller. + + |
+
+ + + + VolatileFieldAttribute + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Adding this attribute to an F# mutable binding causes the "volatile" + prefix to be used for all accesses to the field. + + |
+
+ Type/Module + | ++ Description + | +
+ + | ++ + | +
+ + + + Format<'Printer, 'State, 'Residue, 'Result, 'Tuple> + + + + |
+ + + | +
+ + + + FSharpFunc<'T, 'U> + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + The CLI type used to represent F# function values. This type is not + typically used directly, though may be used from other CLI languages. + + |
+
+ + + + FSharpTypeFunc + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + The CLI type used to represent F# first-class type function values. This type is for use + by compiled F# code. + + |
+
+ + + + FuncConvert + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Helper functions for converting F# first class function values to and from CLI representations + of functions using delegates. + + |
+
+ + + + LanguagePrimitives + + + + |
+ + + | +
+ + + + MatchFailureException + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Non-exhaustive match failures will raise the MatchFailureException exception + + |
+
+ + + + NumericLiterals + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI' + + |
+
+ + + + OptimizedClosures + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + An implementation module used to hold some private implementations of function + value invocation. + + |
+
+ + + + PrintfFormat<'Printer, 'State, 'Residue, 'Result> + + + + |
+ + + | +
+ + + + PrintfFormat<'Printer, 'State, 'Residue, 'Result, 'Tuple> + + + + |
+ + + | +
+ + The SI unit of electric current + +
++ + The SI unit of activity referred to a radionuclide + +
++ + The SI unit of luminous intensity + +
++ + The SI unit of electric charge, amount of electricity + +
++ + The SI unit of capacitance + +
++ + The SI unit of absorbed dose + +
++ + The SI unit of inductance + +
++ + The SI unit of frequency + +
++ + The SI unit of energy, work, amount of heat + +
++ + The SI unit of catalytic activity + +
++ + The SI unit of thermodynamic temperature + +
++ + The SI unit of mass + +
++ + The SI unit of luminous flux + +
++ + The SI unit of illuminance + +
++ + The SI unit of length + +
++ + The SI unit of length + +
++ + The SI unit of amount of substance + +
++ + The SI unit of force + +
++ + The SI unit of electric resistance + +
++ + The SI unit of pressure, stress + +
++ + The SI unit of time + +
++ + The SI unit of electric conductance + +
++ + The SI unit of does equivalent + +
++ + The SI unit of magnetic flux density + +
++ + The SI unit of electric potential difference, electromotive force + +
++ + The SI unit of power, radiant flux + +
++ + The SI unit of magnetic flux + +
++ Type + | ++ Description + | +
+ + + + ampere + + + + |
+ + + | +
+ + + + becquerel + + + + |
+ + + | +
+ + + + candela + + + + |
+ + + | +
+ + + + coulomb + + + + |
+ + + | +
+ + | ++ + | +
+ + | ++ + | +
+ + | ++ + | +
+ + | ++ + | +
+ + | ++ + | +
+ + | ++ + | +
+ + + + kelvin + + + + |
+ + + | +
+ + + + kilogram + + + + |
+ + + | +
+ + | ++ + | +
+ + | ++ + | +
+ + | ++ + | +
+ + | ++ + | +
+ + | ++ + | +
+ + + + newton + + + + |
+ + + | +
+ + | ++ + | +
+ + + + pascal + + + + |
+ + + | +
+ + + + second + + + + |
+ + + | +
+ + + + siemens + + + + |
+ + + | +
+ + + + sievert + + + + |
+ + + | +
+ + | ++ + | +
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + The SI unit of electric potential difference, electromotive force + + + |
+
+ + | ++ + | +
+ + | ++ + | +
+ + A synonym for ampere, the SI unit of electric current + +
++ + A synonym for becquerel, the SI unit of activity referred to a radionuclide + +
++ + A synonym for coulomb, the SI unit of electric charge, amount of electricity + +
++ + A synonym for candela, the SI unit of luminous intensity + +
++ + A synonym for farad, the SI unit of capacitance + +
++ + A synonym for gray, the SI unit of absorbed dose + +
++ + A synonym for henry, the SI unit of inductance + +
++ + A synonym for hertz, the SI unit of frequency + +
++ + A synonym for joule, the SI unit of energy, work, amount of heat + +
++ + A synonym for kelvin, the SI unit of thermodynamic temperature + +
++ + A synonym for katal, the SI unit of catalytic activity + +
++ + A synonym for kilogram, the SI unit of mass + +
++ + A synonym for lumen, the SI unit of luminous flux + +
++ + A synonym for lux, the SI unit of illuminance + +
++ + A synonym for Metre, the SI unit of length + +
++ + A synonym for mole, the SI unit of amount of substance + +
++ + A synonym for newton, the SI unit of force + +
++ + A synonym for UnitNames.ohm, the SI unit of electric resistance. + +
++ + A synonym for pascal, the SI unit of pressure, stress + +
++ + A synonym for siemens, the SI unit of electric conductance + +
++ + A synonym for second, the SI unit of time + +
++ + A synonym for sievert, the SI unit of does equivalent + +
++ + A synonym for tesla, the SI unit of magnetic flux density + +
++ + A synonym for volt, the SI unit of electric potential difference, electromotive force + +
++ + A synonym for watt, the SI unit of power, radiant flux + +
++ + A synonym for weber, the SI unit of magnetic flux + +
++ Type + | ++ Description + | +
+ + | ++ + | +
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + A synonym for becquerel, the SI unit of activity referred to a radionuclide + + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + A synonym for coulomb, the SI unit of electric charge, amount of electricity + + + |
+
+ + | ++ + | +
+ + | ++ + | +
+ + | ++ + | +
+ + | ++ + | +
+ + | ++ + | +
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + A synonym for joule, the SI unit of energy, work, amount of heat + + + |
+
+ + | ++ + | +
+ + | ++ + | +
+ + | ++ + | +
+ + | ++ + | +
+ + | ++ + | +
+ + | ++ + | +
+ + | ++ + | +
+ + | ++ + | +
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + A synonym for UnitNames.ohm, the SI unit of electric resistance. + + + |
+
+ + | ++ + | +
+ + | ++ + | +
+ + | ++ + | +
+ + | ++ + | +
+ + | ++ + | +
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + A synonym for volt, the SI unit of electric potential difference, electromotive force + + + |
+
+ + | ++ + | +
+ + | ++ + | +
+ + Functions for converting nullable values + +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Converts the argument to byte. This is a direct conversion for all + primitive numeric types. The operation requires an appropriate + static conversion method on the input type. + + |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Converts the argument to character. Numeric inputs are converted according to the UTF-16 + encoding for characters. The operation requires an appropriate static conversion method on the input type. + + |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Converts the argument to System.Decimal using a direct conversion for all + primitive numeric types. The operation requires an appropriate + static conversion method on the input type. + + |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Converts the argument to 64-bit float. This is a direct conversion for all + primitive numeric types. The operation requires an appropriate + static conversion method on the input type. + + |
+
+
+
+
+
+
+ |
+
+
+
+ + ++ +
+ Example +++
+namespace System
+namespace Microsoft.FSharp
+namespace Microsoft.FSharp.Linq
+module NullableOperators
+
+from Microsoft.FSharp.Linq
+Multiple items
+type Nullable = + static member Compare<'T (requires default constructor and value type and 'T :> ValueType)> : n1: Nullable<'T> * n2: Nullable<'T> -> int + static member Equals<'T (requires default constructor and value type and 'T :> ValueType)> : n1: Nullable<'T> * n2: Nullable<'T> -> bool + static member GetUnderlyingType: nullableType: Type -> Type + static member GetValueRefOrDefaultRef<'T (requires default constructor and value type and 'T :> ValueType)> : nullable: byref<Nullable<'T>> -> inref<'T> <summary>Supports a value type that can be assigned <see langword="null" />. This class cannot be inherited.</summary> -------------------- [<Struct>] +type Nullable<'T (requires default constructor and value type and 'T :> ValueType)> = + new: value: 'T -> unit + member Equals: other: obj -> bool + member GetHashCode: unit -> int + member GetValueOrDefault: unit -> 'T + 1 overload + member ToString: unit -> string + static member op_Explicit: value: Nullable<'T> -> 'T + static member op_Implicit: value: 'T -> Nullable<'T> + member HasValue: bool + member Value: 'T <summary>Represents a value type that can be assigned <see langword="null" />.</summary> <typeparam name="T">The underlying value type of the <see cref="T:System.Nullable`1" /> generic type.</typeparam> -------------------- Nullable () Nullable(value: 'T) : Nullable<'T> [<Struct>]
+type DayOfWeek =
+ | Sunday = 0
+ | Monday = 1
+ | Tuesday = 2
+ | Wednesday = 3
+ | Thursday = 4
+ | Friday = 5
+ | Saturday = 6
+<summary>Specifies the day of the week.</summary> Multiple items
+
+
+
+ val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = + int |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Converts the argument to 64-bit float. This is a direct conversion for all + primitive numeric types. The operation requires an appropriate + static conversion method on the input type. + + |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Converts the argument to 32-bit float. This is a direct conversion for all + primitive numeric types. The operation requires an appropriate + static conversion method on the input type. + + |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Converts the argument to signed 32-bit integer. This is a direct conversion for all + primitive numeric types. The operation requires an appropriate + static conversion method on the input type. + + |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Converts the argument to signed 16-bit integer. This is a direct conversion for all + primitive numeric types. The operation requires an appropriate + static conversion method on the input type. + + |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Converts the argument to signed 32-bit integer. This is a direct conversion for all + primitive numeric types. The operation requires an appropriate + static conversion method on the input type. + + |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Converts the argument to signed 64-bit integer. This is a direct conversion for all + primitive numeric types. The operation requires an appropriate + static conversion method on the input type. + + |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Converts the argument to signed byte. This is a direct conversion for all + primitive numeric types. The operation requires an appropriate + static conversion method on the input type. + + |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Converts the argument to signed native integer. This is a direct conversion for all + primitive numeric types. Otherwise the operation requires an appropriate + static conversion method on the input type. + + |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Converts the argument to signed byte. This is a direct conversion for all + primitive numeric types. The operation requires an appropriate + static conversion method on the input type. + + |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Converts the argument to 32-bit float. This is a direct conversion for all + primitive numeric types. The operation requires an appropriate + static conversion method on the input type. + + |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Converts the argument to an unsigned 32-bit integer. This is a direct conversion for all + primitive numeric types. The operation requires an appropriate + static conversion method on the input type. + + |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Converts the argument to unsigned 16-bit integer. This is a direct conversion for all + primitive numeric types. The operation requires an appropriate + static conversion method on the input type. + + |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Converts the argument to unsigned 32-bit integer. This is a direct conversion for all + primitive numeric types. The operation requires an appropriate + static conversion method on the input type. + + |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Converts the argument to unsigned 64-bit integer. This is a direct conversion for all + primitive numeric types. The operation requires an appropriate + static conversion method on the input type. + + |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Converts the argument to byte. This is a direct conversion for all + primitive numeric types. The operation requires an appropriate + static conversion method on the input type. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Nullable.unativeint value
+ + + Parameters: +
Nullable<^T>
+ -
+ The input value.
+
+ + + + Returns: + Nullable<unativeint>
+
+ The converted unativeint
+ + Modifiers: + inline + + Type parameters: + ^T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Converts the argument to unsigned native integer using a direct conversion for all + primitive numeric types. Otherwise the operation requires an appropriate + static conversion method on the input type. + + |
+
+ + Operators for working with nullable values, primarily used on F# queries. + +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + The multiplication operator where a nullable value appears on the right + + |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + The multiplication operator where a nullable value appears on the left + + |
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + The subtraction operator where a nullable value appears on the right + + |
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + The multiplication operator where a nullable value appears on both left and right sides + + |
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + The addition operator where a nullable value appears on both left and right sides + + |
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + The subtraction operator where a nullable value appears on both left and right sides + + |
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + The division operator where a nullable value appears on both left and right sides + + |
+
+
+
+
+
+
+ |
+
+
+
+ + +++ This operator is primarily for use in F# queries + +
+ Example +++
+Multiple items
+namespace Microsoft.FSharp -------------------- namespace FSharp namespace Microsoft.FSharp.Linq
+module NullableOperators
+
+from Microsoft.FSharp.Linq
+
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+ + +++ This operator is primarily for use in F# queries + +
+ Example +++
+Multiple items
+namespace Microsoft.FSharp -------------------- namespace FSharp namespace Microsoft.FSharp.Linq
+module NullableOperators
+
+from Microsoft.FSharp.Linq
+
+
+
+ |
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+
+
+
+ + +++ This operator is primarily for use in F# queries + +
+ Example +++
+Multiple items
+namespace Microsoft.FSharp -------------------- namespace FSharp namespace Microsoft.FSharp.Linq
+module NullableOperators
+
+from Microsoft.FSharp.Linq
+
+
+
+ |
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+
+
+
+ + +++ This operator is primarily for use in F# queries + +
+ Example +++
+Multiple items
+namespace Microsoft.FSharp -------------------- namespace FSharp namespace Microsoft.FSharp.Linq
+module NullableOperators
+
+from Microsoft.FSharp.Linq
+
+
+
+ |
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+
+
+
+ + +++ This operator is primarily for use in F# queries + +
+ Example +++
+Multiple items
+namespace Microsoft.FSharp -------------------- namespace FSharp namespace Microsoft.FSharp.Linq
+module NullableOperators
+
+from Microsoft.FSharp.Linq
+
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+ + +++ This operator is primarily for use in F# queries + +
+ Example +++
+Multiple items
+namespace Microsoft.FSharp -------------------- namespace FSharp namespace Microsoft.FSharp.Linq
+module NullableOperators
+
+from Microsoft.FSharp.Linq
+
+
+
+ |
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+ + The type used to support the F# query syntax. Use 'query { ... }' to use the query syntax. See + also F# Query Expressions in the F# Language Guide. + +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Create an instance of this builder. Use 'query { ... }' to use the query syntax. + + |
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ averageBy projection
+ + + Parameters: +
'T -> ^Value
+
+ + + + Returns: + ^Value
+
+ + Modifiers: + inline + + Type parameters: + 'T, 'Q, ^Value + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A query operator that selects a value for each element selected so far and returns the average of these values. + + + |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A query operator that selects a nullable value for each element selected so far and returns the average of these values. + If any nullable does not have a value, it is ignored. + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ contains key
+ + + Parameters: +
'T
+
+ + + + Returns: + bool
+
+ + |
+ + + | +
+ + | ++ + | +
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A query operator that selects distinct elements from the elements selected so far. + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ exactlyOne
+ + + + Returns: + 'T
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A query operator that selects the single, specific element selected so far + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ exactlyOneOrDefault
+ + + + Returns: + 'T
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A query operator that selects the single, specific element of those selected so far, or a default value if that element is not found. + + + |
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ find predicate
+ + + Parameters: +
'T -> bool
+
+ + + + Returns: + 'T
+
+ + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.For
+ + + Parameters: +
QuerySource<'T, 'Q>
+
+ + + + body + + : + 'T -> QuerySource<'Result, 'Q2>
+
+ + + + Returns: + QuerySource<'Result, 'Q>
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + A method used to support the F# query syntax. Projects each element of a sequence to another sequence and combines the resulting sequences into one sequence. + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ groupBy keySelector
+ + + Parameters: +
'T -> 'Key
+
+ + + + Returns: + QuerySource<IGrouping<'Key, 'T>, 'Q>
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A query operator that groups the elements selected so far according to a specified key selector. + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ groupJoin innerSource outerKeySelector innerKeySelector resultSelector
+ + + Parameters: +
QuerySource<'Inner, 'Q>
+
+ + + + outerKeySelector + + : + 'Outer -> 'Key
+
+ + + + innerKeySelector + + : + 'Inner -> 'Key
+
+ + + + resultSelector + + : + 'Outer -> 'Inner seq -> 'Result
+
+ + + + Returns: + QuerySource<'Result, 'Q>
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A query operator that correlates two sets of selected values based on matching keys and groups the results. + Normal usage is 'groupJoin y in elements2 on (key1 = key2) into group'. + + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ groupValBy resultSelector keySelector
+ + + Parameters: +
'T -> 'Value
+
+ + + + keySelector + + : + 'T -> 'Key
+
+ + + + Returns: + QuerySource<IGrouping<'Key, 'Value>, 'Q>
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A query operator that selects a value for each element selected so far and groups the elements by the given key. + + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A query operator that selects the first element from those selected so far. + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ headOrDefault
+ + + + Returns: + 'T
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A query operator that selects the first element of those selected so far, or a default value if the sequence contains no elements. + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ join innerSource outerKeySelector innerKeySelector resultSelector
+ + + Parameters: +
QuerySource<'Inner, 'Q>
+
+ + + + outerKeySelector + + : + 'Outer -> 'Key
+
+ + + + innerKeySelector + + : + 'Inner -> 'Key
+
+ + + + resultSelector + + : + 'Outer -> 'Inner -> 'Result
+
+ + + + Returns: + QuerySource<'Result, 'Q>
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A query operator that correlates two sets of selected values based on matching keys. + Normal usage is 'join y in elements2 on (key1 = key2)'. + + + |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A query operator that selects the last element of those selected so far. + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ lastOrDefault
+ + + + Returns: + 'T
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A query operator that selects the last element of those selected so far, or a default value if no element is found. + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ leftOuterJoin innerSource outerKeySelector innerKeySelector resultSelector
+ + + Parameters: +
QuerySource<'Inner, 'Q>
+
+ + + + outerKeySelector + + : + 'Outer -> 'Key
+
+ + + + innerKeySelector + + : + 'Inner -> 'Key
+
+ + + + resultSelector + + : + 'Outer -> 'Inner seq -> 'Result
+
+ + + + Returns: + QuerySource<'Result, 'Q>
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A query operator that correlates two sets of selected values based on matching keys and groups the results. + If any group is empty, a group with a single default value is used instead. + Normal usage is 'leftOuterJoin y in elements2 on (key1 = key2) into group'. + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ maxBy valueSelector
+ + + Parameters: +
'T -> 'Value
+
+ + + + Returns: + 'Value
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A query operator that selects a value for each element selected so far and returns the maximum resulting value. + + + |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A query operator that selects a nullable value for each element selected so far and returns the maximum of these values. + If any nullable does not have a value, it is ignored. + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ minBy valueSelector
+ + + Parameters: +
'T -> 'Value
+
+ + + + Returns: + 'Value
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A query operator that selects a value for each element selected so far and returns the minimum resulting value. + + + |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A query operator that selects a nullable value for each element selected so far and returns the minimum of these values. + If any nullable does not have a value, it is ignored. + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ nth index
+ + + Parameters: +
int
+
+ + + + Returns: + 'T
+
+ + |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Run
+ + + Parameters: +
Expr<QuerySource<'T, IQueryable>>
+
+ + + + Returns: + IQueryable<'T>
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + A method used to support the F# query syntax. Runs the given quotation as a query using LINQ IQueryable rules. + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ select projection
+ + + Parameters: +
'T -> 'Result
+
+ + + + Returns: + QuerySource<'Result, 'Q>
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A query operator that projects each of the elements selected so far. + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ skip count
+ + + Parameters: +
int
+
+ + + + Returns: + QuerySource<'T, 'Q>
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A query operator that bypasses a specified number of the elements selected so far and selects the remaining elements. + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ skipWhile predicate
+ + + Parameters: +
'T -> bool
+
+ + + + Returns: + QuerySource<'T, 'Q>
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A query operator that bypasses elements in a sequence as long as a specified condition is true and then selects the remaining elements. + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ sortBy keySelector
+ + + Parameters: +
'T -> 'Key
+
+ + + + Returns: + QuerySource<'T, 'Q>
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A query operator that sorts the elements selected so far in ascending order by the given sorting key. + + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ sortByDescending keySelector
+ + + Parameters: +
'T -> 'Key
+
+ + + + Returns: + QuerySource<'T, 'Q>
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A query operator that sorts the elements selected so far in descending order by the given sorting key. + + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ sortByNullable keySelector
+ + + Parameters: +
'T -> Nullable<'Key>
+
+ + + + Returns: + QuerySource<'T, 'Q>
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A query operator that sorts the elements selected so far in ascending order by the given nullable sorting key. + + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ sortByNullableDescending keySelector
+ + + Parameters: +
'T -> Nullable<'Key>
+
+ + + + Returns: + QuerySource<'T, 'Q>
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A query operator that sorts the elements selected so far in descending order by the given nullable sorting key. + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Source
+ + + Parameters: +
IEnumerable<'T>
+
+ + + + Returns: + QuerySource<'T, IEnumerable>
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + A method used to support the F# query syntax. Inputs to queries are implicitly wrapped by a call to one of the overloads of this method. + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Source
+ + + Parameters: +
IQueryable<'T>
+
+ + + + Returns: + QuerySource<'T, 'Q>
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + A method used to support the F# query syntax. Inputs to queries are implicitly wrapped by a call to one of the overloads of this method. + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ sumBy projection
+ + + Parameters: +
'T -> ^Value
+
+ + + + Returns: + ^Value
+
+ + Modifiers: + inline + + Type parameters: + 'T, 'Q, ^Value + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A query operator that selects a value for each element selected so far and returns the sum of these values. + + + |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A query operator that selects a nullable value for each element selected so far and returns the sum of these values. + If any nullable does not have a value, it is ignored. + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ take count
+ + + Parameters: +
int
+
+ + + + Returns: + QuerySource<'T, 'Q>
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A query operator that selects a specified number of contiguous elements from those selected so far. + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ takeWhile predicate
+ + + Parameters: +
'T -> bool
+
+ + + + Returns: + QuerySource<'T, 'Q>
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A query operator that selects elements from a sequence as long as a specified condition is true, and then skips the remaining elements. + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ thenBy keySelector
+ + + Parameters: +
'T -> 'Key
+
+ + + + Returns: + QuerySource<'T, 'Q>
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A query operator that performs a subsequent ordering of the elements selected so far in ascending order by the given sorting key. + This operator may only be used immediately after a 'sortBy', 'sortByDescending', 'thenBy' or 'thenByDescending', or their nullable variants. + + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ thenByDescending keySelector
+ + + Parameters: +
'T -> 'Key
+
+ + + + Returns: + QuerySource<'T, 'Q>
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A query operator that performs a subsequent ordering of the elements selected so far in descending order by the given sorting key. + This operator may only be used immediately after a 'sortBy', 'sortByDescending', 'thenBy' or 'thenByDescending', or their nullable variants. + + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ thenByNullable keySelector
+ + + Parameters: +
'T -> Nullable<'Key>
+
+ + + + Returns: + QuerySource<'T, 'Q>
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A query operator that performs a subsequent ordering of the elements selected so far in ascending order by the given nullable sorting key. + This operator may only be used immediately after a 'sortBy', 'sortByDescending', 'thenBy' or 'thenByDescending', or their nullable variants. + + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ thenByNullableDescending keySelector
+ + + Parameters: +
'T -> Nullable<'Key>
+
+ + + + Returns: + QuerySource<'T, 'Q>
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A query operator that performs a subsequent ordering of the elements selected so far in descending order by the given nullable sorting key. + This operator may only be used immediately after a 'sortBy', 'sortByDescending', 'thenBy' or 'thenByDescending', or their nullable variants. + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ where predicate
+ + + Parameters: +
'T -> bool
+
+ + + + Returns: + QuerySource<'T, 'Q>
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A query operator that selects those elements based on a specified predicate. + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Yield
+ + + Parameters: +
'T
+
+ + + + Returns: + QuerySource<'T, 'Q>
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + A method used to support the F# query syntax. Returns a sequence of length one that contains the specified value. + + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.YieldFrom
+ + + Parameters: +
QuerySource<'T, 'Q>
+
+ + + + Returns: + QuerySource<'T, 'Q>
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + A method used to support the F# query syntax. Returns a sequence that contains the specified values. + + + |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + A method used to support the F# query syntax. Returns an empty sequence that has the specified type argument. + + + |
+
+ + A module used to support the F# query syntax. + +
++ Type extension + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Run
+ + + Parameters: +
Expr<QuerySource<'T, IEnumerable>>
+
+ + + + Returns: + 'T seq
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + A method used to support the F# query syntax. Runs the given quotation as a query using LINQ IEnumerable rules. + + + |
+
+ + A module used to support the F# query syntax. + +
++ Type extension + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.Run
+ + + Parameters: +
Expr<'T>
+
+ + + + Returns: + 'T
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + A method used to support the F# query syntax. Runs the given quotation as a query using LINQ rules. + + + |
+
+ + Contains modules used to support the F# query syntax. + +
++ Modules + | ++ Description + | +
+ + + + HighPriority + + + + |
+ + + | +
+ + + + LowPriority + + + + |
+ + + | +
+ + A partial input or result in an F# query. This type is used to support the F# query syntax. + +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ QuerySource(arg1)
+ + + Parameters: +
'T seq
+
+ + + + Returns: + QuerySource<'T, 'Q>
+
+ + |
+ + + | +
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+ + A type used to reconstruct a grouping after applying a mutable->immutable mapping transformation + on a result of a query. + +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+ |
+
+
|
+
+ + Contains functionality to convert F# quotations to LINQ expression trees. + +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ ImplicitExpressionConversionHelper arg1
+ + + Parameters: +
'T
+
+ + + + Returns: + Expression<'T>
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + When used in a quotation, this function indicates a specific conversion + should be performed when converting the quotation to a LINQ expression. + + This function should not be called directly. + + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ MemberInitializationHelper arg1
+ + + Parameters: +
'T
+
+ + + + Returns: + 'T
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + When used in a quotation, this function indicates a specific conversion + should be performed when converting the quotation to a LINQ expression. + + This function should not be called directly. + + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ NewAnonymousObjectHelper arg1
+ + + Parameters: +
'T
+
+ + + + Returns: + 'T
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + When used in a quotation, this function indicates a specific conversion + should be performed when converting the quotation to a LINQ expression. + + This function should not be called directly. + + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ QuotationToExpression arg1
+ + + Parameters: +
Expr
+
+ + + + Returns: + Expression
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Converts a subset of F# quotations to a LINQ expression, for the subset of LINQ expressions represented by the + expression syntax in the C# language. + + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ QuotationToLambdaExpression arg1
+ + + Parameters: +
Expr<'T>
+
+ + + + Returns: + Expression<'T>
+
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Converts a subset of F# quotations to a LINQ expression, for the subset of LINQ expressions represented by the + expression syntax in the C# language. + + + |
+
+ + | ++ + | +
+ + | ++ + | +
+ + Library functionality associated with converting F# quotations to .NET LINQ expression trees. + +
++ Type/Module + | ++ Description + | +
+ + + + Grouping<'K, 'T> + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + A type used to reconstruct a grouping after applying a mutable->immutable mapping transformation + on a result of a query. + + + |
+
+ + + + LeafExpressionConverter + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Contains functionality to convert F# quotations to LINQ expression trees. + + + |
+
+ + Library functionality for F# query syntax and interoperability with .NET LINQ Expressions. See + also F# Query Expressions in the F# Language Guide. + +
++ Type/Module + | ++ Description + | +
+ + + + Nullable + + + + |
+ + + | +
+ + + + NullableOperators + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + Operators for working with nullable values, primarily used on F# queries. + + + |
+
+ + + + QueryBuilder + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + The type used to support the F# query syntax. Use 'query { ... }' to use the query syntax. See + also F# Query Expressions in the F# Language Guide. + + + |
+
+ + + + QuerySource<'T, 'Q> + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + + A partial input or result in an F# query. This type is used to support the F# query syntax. + + + |
+
+ Contains operations on native pointers. Use of these operators may + result in the generation of unverifiable code. +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ NativePtr.add address index
+ + + Parameters: +
nativeptr<'T>
+ -
+ The input pointer.
+
+ + + + index + + : + int
+ -
+ The index by which to offset the pointer.
+
+ + + + Returns: + nativeptr<'T>
+
+ A typed pointer.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns a typed native pointer by adding index * sizeof<'T> to the + given input pointer. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ NativePtr.clear address
+ + + Parameters: +
nativeptr<'T>
+ -
+ The input pointer.
+
+ + + Modifiers: + inline + + Type parameters: + 'T + |
+ + + | +
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ NativePtr.copyBlock destination source count
+ + + Parameters: +
nativeptr<'T>
+ -
+ The destination pointer.
+
+ + + + source + + : + nativeptr<'T>
+ -
+ The source pointer.
+
+ + + + count + + : + int
+ -
+ The source pointer.
+
+ + + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Copies a block of memory to a specified destination address starting from a specified source address until a specified byte count of (count * sizeof<'T>). + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ NativePtr.get address index
+ + + Parameters: +
nativeptr<'T>
+ -
+ The input pointer.
+
+ + + + index + + : + int
+ -
+ The index by which to offset the pointer.
+
+ + + + Returns: + 'T
+
+ The value at the pointer address.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Dereferences the typed native pointer computed by adding index * sizeof<'T> to the + given input pointer. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ NativePtr.initBlock address value count
+ + + Parameters: +
nativeptr<'T>
+ -
+ The input pointer.
+
+ + + + value + + : + byte
+ -
+ The initial byte value.
+
+ + + + count + + : + uint32
+ -
+ The total repeat count of the byte value.
+
+ + + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Initializes a specified block of memory starting at a specific address to a given byte count and initial byte value. + + |
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ NativePtr.nullPtr
+ + + + Returns: + nativeptr<'T>
+
+ The null native pointer.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+ + + | +
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ NativePtr.read address
+ + + Parameters: +
nativeptr<'T>
+ -
+ The input pointer.
+
+ + + + Returns: + 'T
+
+ The value at the pointer address.
+ + Modifiers: + inline + + Type parameters: + 'T + |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ NativePtr.set address index value
+ + + Parameters: +
nativeptr<'T>
+ -
+ The input pointer.
+
+ + + + index + + : + int
+ -
+ The index by which to offset the pointer.
+
+ + + + value + + : + 'T
+ -
+ The value to assign.
+
+ + + Modifiers: + inline + + Type parameters: + 'T + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Assigns the |
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ NativePtr.write address value
+ + + Parameters: +
nativeptr<'T>
+ -
+ The input pointer.
+
+ + + + value + + : + 'T
+ -
+ The value to assign.
+
+ + + Modifiers: + inline + + Type parameters: + 'T + |
+ + + | +
+ + Library functionality for native interopability. See + also F# External Functions in + the F# Language Guide. + +
++ Modules + | ++ Description + | +
+ + + + NativePtr + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Contains operations on native pointers. Use of these operators may + result in the generation of unverifiable code. + + |
+
+ Contains a set of derived F# active patterns to analyze F# expression objects +
++ Active pattern + | ++ Description + | +
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+Multiple items
+namespace Microsoft.FSharp -------------------- namespace FSharp namespace Microsoft.FSharp.Quotations
+module DerivedPatterns
+
+from Microsoft.FSharp.Quotations
+active recognizer AndAlso: Quotations.Expr -> (Quotations.Expr * Quotations.Expr) option
+val a: Quotations.Expr
+val b: Quotations.Expr
+val failwith: message: string -> 'T
+
+
+ Evaluates to <@ true @>, <@ false @> .
+
+
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + An active pattern to recognize expressions that represent the application of a (possibly curried or tupled) first class function value + + |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+Multiple items
+namespace Microsoft.FSharp -------------------- namespace FSharp namespace Microsoft.FSharp.Quotations
+module DerivedPatterns
+
+from Microsoft.FSharp.Quotations
+active recognizer Bool: Quotations.Expr -> bool option
+val v: bool
+val failwith: message: string -> 'T
+
+
+ Evaluates to true .
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+Multiple items
+namespace Microsoft.FSharp -------------------- namespace FSharp namespace Microsoft.FSharp.Quotations
+module DerivedPatterns
+
+from Microsoft.FSharp.Quotations
+active recognizer Byte: Quotations.Expr -> byte option
+val v: byte
+val failwith: message: string -> 'T
+
+
+ Evaluates to 8uy .
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + An active pattern to recognize constant unicode character expressions + + |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+Multiple items
+namespace Microsoft.FSharp -------------------- namespace FSharp namespace Microsoft.FSharp.Quotations
+module DerivedPatterns
+
+from Microsoft.FSharp.Quotations
+active recognizer Decimal: Quotations.Expr -> decimal option
+val v: decimal
+val failwith: message: string -> 'T
+
+
+ Evaluates to 8.0M .
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + An active pattern to recognize constant 64-bit floating point number expressions + + |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+Multiple items
+namespace Microsoft.FSharp -------------------- namespace FSharp namespace Microsoft.FSharp.Quotations
+module DerivedPatterns
+
+from Microsoft.FSharp.Quotations
+active recognizer Int16: Quotations.Expr -> int16 option
+val v: int16
+val failwith: message: string -> 'T
+
+
+ Evaluates to 8s .
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+Multiple items
+namespace Microsoft.FSharp -------------------- namespace FSharp namespace Microsoft.FSharp.Quotations
+module DerivedPatterns
+
+from Microsoft.FSharp.Quotations
+active recognizer Int32: Quotations.Expr -> int32 option
+val v: int32
+val failwith: message: string -> 'T
+
+
+ Evaluates to 8 .
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+Multiple items
+namespace Microsoft.FSharp -------------------- namespace FSharp namespace Microsoft.FSharp.Quotations
+module DerivedPatterns
+
+from Microsoft.FSharp.Quotations
+active recognizer Int64: Quotations.Expr -> int64 option
+val v: int64
+val failwith: message: string -> 'T
+
+
+ Evaluates to 8L .
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + An active pattern to recognize expressions that represent a (possibly curried or tupled) first class function value + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ (|MethodWithReflectedDefinition|_|) methodBase
+ + + Parameters: +
MethodBase
+ -
+ The description of the method.
+
+ + + + Returns: + Expr option
+
+ The expression of the method definition if found, or None.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + An active pattern to recognize methods that have an associated ReflectedDefinition + + |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+Multiple items
+namespace Microsoft.FSharp -------------------- namespace FSharp namespace Microsoft.FSharp.Quotations
+module DerivedPatterns
+
+from Microsoft.FSharp.Quotations
+active recognizer OrElse: Quotations.Expr -> (Quotations.Expr * Quotations.Expr) option
+val a: Quotations.Expr
+val b: Quotations.Expr
+val failwith: message: string -> 'T
+
+
+ Evaluates to <@ true @>, <@ false @> .
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ (|PropertyGetterWithReflectedDefinition|_|) propertyInfo
+ + + Parameters: +
PropertyInfo
+ -
+ The description of the property.
+
+ + + + Returns: + Expr option
+
+ The expression of the method definition if found, or None.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + An active pattern to recognize property getters or values in modules that have an associated ReflectedDefinition + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ (|PropertySetterWithReflectedDefinition|_|) propertyInfo
+ + + Parameters: +
PropertyInfo
+ -
+ The description of the property.
+
+ + + + Returns: + Expr option
+
+ The expression of the method definition if found, or None.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + An active pattern to recognize property setters that have an associated ReflectedDefinition + + |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+Multiple items
+namespace Microsoft.FSharp -------------------- namespace FSharp namespace Microsoft.FSharp.Quotations
+module DerivedPatterns
+
+from Microsoft.FSharp.Quotations
+active recognizer SByte: Quotations.Expr -> sbyte option
+val v: sbyte
+val failwith: message: string -> 'T
+
+
+ Evaluates to 8y .
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + An active pattern to recognize constant 32-bit floating point number expressions + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ (|SpecificCall|_|) templateParameter
+ + + Parameters: +
Expr
+ -
+ The input template expression to specify the method to call.
+
+ + + + Returns: + Expr -> (Expr option * Type list * Expr list) option
+
+ The optional target object (present if the target is an
+ instance method), the generic type instantiation (non-empty if the target is a generic
+ instantiation), and the arguments to the function or method.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + A parameterized active pattern to recognize calls to a specified function or method. + The returned elements are the optional target object (present if the target is an + instance method), the generic type instantiation (non-empty if the target is a generic + instantiation), and the arguments to the function or method. + + |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+Multiple items
+namespace Microsoft.FSharp -------------------- namespace FSharp namespace Microsoft.FSharp.Quotations
+module DerivedPatterns
+
+from Microsoft.FSharp.Quotations
+Multiple items
+active recognizer String: Quotations.Expr -> string option -------------------- module String + +from Microsoft.FSharp.Core val v: string
+val failwith: message: string -> 'T
+
+
+ Evaluates to "a" .
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+Multiple items
+namespace Microsoft.FSharp -------------------- namespace FSharp namespace Microsoft.FSharp.Quotations
+module DerivedPatterns
+
+from Microsoft.FSharp.Quotations
+active recognizer UInt16: Quotations.Expr -> uint16 option
+val v: uint16
+val failwith: message: string -> 'T
+
+
+ Evaluates to 8us .
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+Multiple items
+namespace Microsoft.FSharp -------------------- namespace FSharp namespace Microsoft.FSharp.Quotations
+module DerivedPatterns
+
+from Microsoft.FSharp.Quotations
+active recognizer UInt32: Quotations.Expr -> uint32 option
+val v: uint32
+val failwith: message: string -> 'T
+
+
+ Evaluates to 8u .
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+Multiple items
+namespace Microsoft.FSharp -------------------- namespace FSharp namespace Microsoft.FSharp.Quotations
+module DerivedPatterns
+
+from Microsoft.FSharp.Quotations
+active recognizer UInt64: Quotations.Expr -> uint64 option
+val v: uint64
+val failwith: message: string -> 'T
+
+
+ Evaluates to 8UL .
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+Multiple items
+namespace Microsoft.FSharp -------------------- namespace FSharp namespace Microsoft.FSharp.Quotations
+module DerivedPatterns
+
+from Microsoft.FSharp.Quotations
+active recognizer Unit: Quotations.Expr -> unit option
+val v: unit
+val failwith: message: string -> 'T
+
+
+ Evaluates to true .
+
+
+ |
+
+ Active patterns for traversing, visiting, rebuilding and transforming expressions in a generic way +
++ Function or value + | ++ Description + | +
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Re-build combination expressions. The first parameter should be an object
+ returned by the |
+
+ Active pattern + | ++ Description + | +
+
+
+
+
+
+
+ |
+ + + | +
+ Type-carrying quoted expressions. Expressions are generated either + by quotations in source text or programatically +
++ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Gets the raw expression associated with this type-carrying expression + + |
+
+ Quoted expressions annotated with System.Type values. +
++ Instance member + | ++ Description + | +
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns the custom attributes of an expression. For quotations deriving from quotation literals this may include the source location of the literal. + + |
+
+
+
+
+
+
+ |
+
+
+
+ + ++ ++ Example +++
+Multiple items
+namespace Microsoft.FSharp -------------------- namespace FSharp namespace Microsoft.FSharp.Quotations
+namespace Microsoft.FSharp
+module Patterns
+
+from Microsoft.FSharp.Quotations
+val sampleQuotation: Expr<(int -> int)>
+val v: int
+val v: Var
+val body: Expr
+active recognizer Lambda: Expr -> (Var * Expr) option
+val failwith: message: string -> 'T
+member Expr.GetFreeVars: unit -> Var seq
+
+
+ Evaluates to a set containing the single variable for v
+
+ |
+
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Substitutes through the given expression using the given functions + to map variables to new values. The functions must give consistent results + at each application. Variable renaming may occur on the target expression + if variable capture occurs. + + |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+Multiple items
+namespace Microsoft.FSharp -------------------- namespace FSharp namespace Microsoft.FSharp.Quotations
+val expr1: Expr<int>
+System.Object.ToString() : string
+
+
+ Evaluates member Expr.ToString: full: bool -> string "Call (None, Int32 op_Addition[Int32,Int32,Int32](Int32, Int32),[Value (1), Value (1)])" .
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+Multiple items
+namespace Microsoft.FSharp -------------------- namespace FSharp namespace Microsoft.FSharp.Quotations
+namespace Microsoft.FSharp
+module Patterns
+
+from Microsoft.FSharp.Quotations
+val sampleQuotation: Expr<int>
+property Expr.Type: System.Type with get
+
+
+ Evaluates to typeof<int> .
+
+
+ |
+
+ Static member + | ++ Description + | +
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Builds an expression that represents getting the address of a value. + + |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Builds an expression that represents setting the value held at a particular address. + + |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Builds an expression that represents the application of a first class function value to a single argument. + + |
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Builds an expression that represents the application of a first class function value to multiple arguments + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Expr.Call(obj, methodInfo, arguments)
+ + + Parameters: +
Expr
+ -
+ The input object.
+
+ + + + methodInfo + + : + MethodInfo
+ -
+ The description of the method to call.
+
+ + + + arguments + + : + Expr list
+ -
+ The list of arguments to the method.
+
+ + + + Returns: + Expr
+
+ The resulting expression.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Builds an expression that represents a call to an instance method associated with an object + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Expr.Call(methodInfo, arguments)
+ + + Parameters: +
MethodInfo
+ -
+ The MethodInfo describing the method to call.
+
+ + + + arguments + + : + Expr list
+ -
+ The list of arguments to the method.
+
+ + + + Returns: + Expr
+
+ The resulting expression.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Builds an expression that represents a call to an static method or module-bound function + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Expr.CallWithWitnesses(obj, methodInfo, methodInfoWithWitnesses, witnesses, arguments)
+ + + Parameters: +
Expr
+ -
+ The input object.
+
+ + + + methodInfo + + : + MethodInfo
+ -
+ The description of the method to call.
+
+ + + + methodInfoWithWitnesses + + : + MethodInfo
+ -
+ The additional MethodInfo describing the method to call, accepting witnesses.
+
+ + + + witnesses + + : + Expr list
+ -
+ The list of witnesses to the method.
+
+ + + + arguments + + : + Expr list
+ -
+ The list of arguments to the method.
+
+ + + + Returns: + Expr
+
+ The resulting expression.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Builds an expression that represents a call to an instance method associated with an object, potentially passing additional witness arguments + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Expr.CallWithWitnesses(methodInfo, methodInfoWithWitnesses, witnesses, arguments)
+ + + Parameters: +
MethodInfo
+ -
+ The MethodInfo describing the method to call.
+
+ + + + methodInfoWithWitnesses + + : + MethodInfo
+ -
+ The additional MethodInfo describing the method to call, accepting witnesses.
+
+ + + + witnesses + + : + Expr list
+ -
+ The list of witnesses to the method.
+
+ + + + arguments + + : + Expr list
+ -
+ The list of arguments to the method.
+
+ + + + Returns: + Expr
+
+ The resulting expression.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Builds an expression that represents a call to an static method or module-bound function, potentially passing additional witness arguments + + |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns a new typed expression given an underlying runtime-typed expression. + A type annotation is usually required to use this function, and + using an incorrect type annotation may result in a later runtime exception. + + |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Builds an expression that represents the coercion of an expression to a type + + |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Builds an expression that represents the invocation of a default object constructor + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Expr.Deserialize(qualifyingType, spliceTypes, spliceExprs, bytes)
+ + + Parameters: +
Type
+ -
+ A type in the assembly where the quotation occurs.
+
+ + + + spliceTypes + + : + Type list
+ -
+ The spliced types, to replace references to type variables.
+
+ + + + spliceExprs + + : + Expr list
+ -
+ The spliced expressions to replace references to spliced expressions.
+
+ + + + bytes + + : + byte[]
+ -
+ The serialized form of the quoted expression.
+
+ + + + Returns: + Expr
+
+ The resulting expression.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + This function is called automatically when quotation syntax (<@ @>) and other sources of + quotations are used. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Expr.Deserialize40(qualifyingType, referencedTypes, spliceTypes, spliceExprs, bytes)
+ + + Parameters: +
Type
+ -
+ A type in the assembly where the quotation occurs.
+
+ + + + referencedTypes + + : + Type[]
+ -
+ The type definitions referenced.
+
+ + + + spliceTypes + + : + Type[]
+ -
+ The spliced types, to replace references to type variables.
+
+ + + + spliceExprs + + : + Expr[]
+ -
+ The spliced expressions to replace references to spliced expressions.
+
+ + + + bytes + + : + byte[]
+ -
+ The serialized form of the quoted expression.
+
+ + + + Returns: + Expr
+
+ The resulting expression.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + This function is called automatically when quotation syntax (<@ @>) and other sources of + quotations are used. + + |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Builds an expression that represents the access of a field of an object + + |
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+Multiple items
+namespace Microsoft.FSharp -------------------- namespace FSharp namespace Microsoft.FSharp.Quotations
+namespace Microsoft.FSharp
+module Patterns
+
+from Microsoft.FSharp.Quotations
+val fieldInfo: System.Reflection.FieldInfo
+val typeof<'T> : System.Type
+namespace System
+[<Struct>]
+type DayOfWeek =
+ | Sunday = 0
+ | Monday = 1
+ | Tuesday = 2
+ | Wednesday = 3
+ | Thursday = 4
+ | Friday = 5
+ | Saturday = 6
+<summary>Specifies the day of the week.</summary> Multiple items
+type Expr = + override Equals: obj: obj -> bool + member GetFreeVars: unit -> Var seq + member Substitute: substitution: (Var -> Expr option) -> Expr + member ToString: full: bool -> string + static member AddressOf: target: Expr -> Expr + static member AddressSet: target: Expr * value: Expr -> Expr + static member Application: functionExpr: Expr * argument: Expr -> Expr + static member Applications: functionExpr: Expr * arguments: Expr list list -> Expr + static member Call: methodInfo: MethodInfo * arguments: Expr list -> Expr + 1 overload + static member CallWithWitnesses: methodInfo: MethodInfo * methodInfoWithWitnesses: MethodInfo * witnesses: Expr list * arguments: Expr list -> Expr + 1 overload + ... -------------------- type Expr<'T> = + inherit Expr + member Raw: Expr static member Expr.FieldGet: fieldInfo: System.Reflection.FieldInfo -> Expr
+
+
+ Evaluates to static member Expr.FieldGet: obj: Expr * fieldInfo: System.Reflection.FieldInfo -> Expr FieldGet (None, Monday) . Note that for technical reasons the quotation <@ System.DayOfWeek.Monday @> evaluates to a different quotation containing a constant enum value Value (Monday) .
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Expr.FieldSet(obj, fieldInfo, value)
+ + + Parameters: +
Expr
+ -
+ The input object.
+
+ + + + fieldInfo + + : + FieldInfo
+ -
+ The description of the field to write to.
+
+ + + + value + + : + Expr
+ -
+ The value to set to the field.
+
+ + + + Returns: + Expr
+
+ The resulting expression.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Builds an expression that represents writing to a field of an object + + |
+
+
+
+
+
+
+
+ |
+
+
+
+ + +++ Settable public static fields are rare in F# and .NET libraries, so examples of using this method are uncommon. + +
|
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Expr.ForIntegerRangeLoop(loopVariable, start, endExpr, body)
+ + + Parameters: +
Var
+ -
+ The sub-expression declaring the loop variable.
+
+ + + + start + + : + Expr
+ -
+ The sub-expression setting the initial value of the loop variable.
+
+ + + + endExpr + + : + Expr
+ -
+ The sub-expression declaring the final value of the loop variable.
+
+ + + + body + + : + Expr
+ -
+ The sub-expression representing the body of the loop.
+
+ + + + Returns: + Expr
+
+ The resulting expression.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Builds a 'for i = ... to ... do ...' expression that represent loops over integer ranges + + |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Fetches or creates a new variable with the given name and type from a global pool of shared variables + indexed by name and type. The type is given by the explicit or inferred type parameter + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Expr.IfThenElse(guard, thenExpr, elseExpr)
+ + + Parameters: +
Expr
+ -
+ The condition expression.
+
+ + + + thenExpr + + : + Expr
+ -
+ The then sub-expression.
+
+ + + + elseExpr + + : + Expr
+ -
+ The else sub-expression.
+
+ + + + Returns: + Expr
+
+ The resulting expression.
+ + |
+
+
+
+ + ++
+ Example +++
+Multiple items
+namespace Microsoft.FSharp -------------------- namespace FSharp namespace Microsoft.FSharp.Quotations
+val guardExpr: Expr<bool>
+val thenExpr: Expr<int>
+val elseExpr: Expr<int>
+Multiple items
+type Expr = + override Equals: obj: obj -> bool + member GetFreeVars: unit -> Var seq + member Substitute: substitution: (Var -> Expr option) -> Expr + member ToString: full: bool -> string + static member AddressOf: target: Expr -> Expr + static member AddressSet: target: Expr * value: Expr -> Expr + static member Application: functionExpr: Expr * argument: Expr -> Expr + static member Applications: functionExpr: Expr * arguments: Expr list list -> Expr + static member Call: methodInfo: MethodInfo * arguments: Expr list -> Expr + 1 overload + static member CallWithWitnesses: methodInfo: MethodInfo * methodInfoWithWitnesses: MethodInfo * witnesses: Expr list * arguments: Expr list -> Expr + 1 overload + ... -------------------- type Expr<'T> = + inherit Expr + member Raw: Expr static member Expr.IfThenElse: guard: Expr * thenExpr: Expr * elseExpr: Expr -> Expr
+
+
+ Evaluates to a quotation with the same structure as <@ if 1 > 3 then 6 else 7 @> .
+
+
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Builds an expression that represents the construction of an F# function value + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Expr.Let(letVariable, letExpr, body)
+ + + Parameters: +
Var
+ -
+ The variable in the let expression.
+
+ + + + letExpr + + : + Expr
+ -
+ The expression bound to the variable.
+
+ + + + body + + : + Expr
+ -
+ The sub-expression where the binding is in scope.
+
+ + + + Returns: + Expr
+
+ The resulting expression.
+ + |
+
+
+
+ + ++
+ Example +++
+Multiple items
+namespace Microsoft.FSharp -------------------- namespace FSharp namespace Microsoft.FSharp.Quotations
+val vVar: Var
+Multiple items
+type Var = + interface IComparable + new: name: string * typ: Type * ?isMutable: bool -> Var + static member Global: name: string * typ: Type -> Var + member IsMutable: bool + member Name: string + member Type: Type -------------------- new: name: string * typ: System.Type * ?isMutable: bool -> Var val typeof<'T> : System.Type
+Multiple items
+val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = + int val rhsExpr: Expr<int>
+val vExpr: Expr
+Multiple items
+type Expr = + override Equals: obj: obj -> bool + member GetFreeVars: unit -> Var seq + member Substitute: substitution: (Var -> Expr option) -> Expr + member ToString: full: bool -> string + static member AddressOf: target: Expr -> Expr + static member AddressSet: target: Expr * value: Expr -> Expr + static member Application: functionExpr: Expr * argument: Expr -> Expr + static member Applications: functionExpr: Expr * arguments: Expr list list -> Expr + static member Call: methodInfo: MethodInfo * arguments: Expr list -> Expr + 1 overload + static member CallWithWitnesses: methodInfo: MethodInfo * methodInfoWithWitnesses: MethodInfo * witnesses: Expr list * arguments: Expr list -> Expr + 1 overload + ... -------------------- type Expr<'T> = + inherit Expr + member Raw: Expr static member Expr.Var: variable: Var -> Expr
+static member Expr.Let: letVariable: Var * letExpr: Expr * body: Expr -> Expr
+
+
+ Evaluates to a quotation with the same structure as <@ let v = 6 in v @> .
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Expr.LetRecursive(bindings, body)
+ + + Parameters: +
(Var * Expr) list
+ -
+ The list of bindings for the let expression.
+
+ + + + body + + : + Expr
+ -
+ The sub-expression where the bindings are in scope.
+
+ + + + Returns: + Expr
+
+ The resulting expression.
+ + |
+
+
+
+ + ++
+ Example +++
+Multiple items
+namespace Microsoft.FSharp -------------------- namespace FSharp namespace Microsoft.FSharp.Quotations
+namespace Microsoft.FSharp
+module Patterns
+
+from Microsoft.FSharp.Quotations
+val fVar: Var
+Multiple items
+active recognizer Var: Expr -> Var option -------------------- type Var = + interface IComparable + new: name: string * typ: Type * ?isMutable: bool -> Var + static member Global: name: string * typ: Type -> Var + member IsMutable: bool + member Name: string + member Type: Type -------------------- new: name: string * typ: System.Type * ?isMutable: bool -> Var val typeof<'T> : System.Type
+Multiple items
+val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = + int val gVar: Var
+val fExpr: Expr
+Multiple items
+type Expr = + override Equals: obj: obj -> bool + member GetFreeVars: unit -> Var seq + member Substitute: substitution: (Var -> Expr option) -> Expr + member ToString: full: bool -> string + static member AddressOf: target: Expr -> Expr + static member AddressSet: target: Expr * value: Expr -> Expr + static member Application: functionExpr: Expr * argument: Expr -> Expr + static member Applications: functionExpr: Expr * arguments: Expr list list -> Expr + static member Call: methodInfo: MethodInfo * arguments: Expr list -> Expr + 1 overload + static member CallWithWitnesses: methodInfo: MethodInfo * methodInfoWithWitnesses: MethodInfo * witnesses: Expr list * arguments: Expr list -> Expr + 1 overload + ... -------------------- type Expr<'T> = + inherit Expr + member Raw: Expr static member Expr.Var: variable: Var -> Expr
+val gExpr: Expr
+val fImplExpr: Expr<(int -> int)>
+val x: int
+val gImplExpr: Expr<(int -> int)>
+val bodyExpr: Expr<int>
+static member Expr.LetRecursive: bindings: (Var * Expr) list * body: Expr -> Expr
+
+
+ Evaluates to a quotation with the same structure as <@ let rec f x = g (x-1) + 1 and g x = if x > 0 then f (x - 1) else 0 in g 10 @> .
+
+
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Builds an expression that represents the creation of an array value initialized with the given elements + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Expr.NewDelegate(delegateType, parameters, body)
+ + + Parameters: +
Type
+ -
+ The type of delegate.
+
+ + + + parameters + + : + Var list
+ -
+ The parameters for the delegate.
+
+ + + + body + + : + Expr
+ -
+ The body of the function.
+
+ + + + Returns: + Expr
+
+ The resulting expression.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Builds an expression that represents the creation of a delegate value for the given type + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Expr.NewObject(constructorInfo, arguments)
+ + + Parameters: +
ConstructorInfo
+ -
+ The description of the constructor.
+
+ + + + arguments + + : + Expr list
+ -
+ The list of arguments to the constructor.
+
+ + + + Returns: + Expr
+
+ The resulting expression.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Builds an expression that represents the invocation of an object constructor + + |
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+Multiple items
+namespace Microsoft.FSharp -------------------- namespace FSharp namespace Microsoft.FSharp.Quotations
+type R =
+ {
+ Y: int
+ X: string
+ }
+R.Y: int
+Multiple items
+val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = + int R.X: string
+Multiple items
+val string: value: 'T -> string -------------------- type string = System.String Multiple items
+type Expr = + override Equals: obj: obj -> bool + member GetFreeVars: unit -> Var seq + member Substitute: substitution: (Var -> Expr option) -> Expr + member ToString: full: bool -> string + static member AddressOf: target: Expr -> Expr + static member AddressSet: target: Expr * value: Expr -> Expr + static member Application: functionExpr: Expr * argument: Expr -> Expr + static member Applications: functionExpr: Expr * arguments: Expr list list -> Expr + static member Call: methodInfo: MethodInfo * arguments: Expr list -> Expr + 1 overload + static member CallWithWitnesses: methodInfo: MethodInfo * methodInfoWithWitnesses: MethodInfo * witnesses: Expr list * arguments: Expr list -> Expr + 1 overload + ... -------------------- type Expr<'T> = + inherit Expr + member Raw: Expr static member Expr.NewRecord: recordType: System.Type * elements: Expr list -> Expr
+val typeof<'T> : System.Type
+
+
+ Evaluates to a quotation with the same structure as <@ { Y = 1; X = "a" } @> .
+
+
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Builds an expression that represents the creation of an F# tuple value + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Expr.NewStructTuple(asm, elements)
+ + + Parameters: +
Assembly
+ -
+ Runtime assembly containing System.ValueTuple definitions.
+
+ + + + elements + + : + Expr list
+ -
+ The list of elements of the tuple.
+
+ + + + Returns: + Expr
+
+ The resulting expression.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Builds an expression that represents the creation of an F# tuple value + + |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Builds an expression that represents the creation of an F# tuple value + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Expr.NewUnionCase(unionCase, arguments)
+ + + Parameters: +
UnionCaseInfo
+ -
+ The description of the union case.
+
+ + + + arguments + + : + Expr list
+ -
+ The list of arguments for the case.
+
+ + + + Returns: + Expr
+
+ The resulting expression.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Builds an expression that represents the creation of a union case value + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Expr.PropertyGet(property, ?indexerArgs)
+ + + Parameters: +
PropertyInfo
+ -
+ The description of the property.
+
+ + + + ?indexerArgs + + : + Expr list
+ -
+ List of indices for the property if it is an indexed property.
+
+ + + + Returns: + Expr
+
+ The resulting expression.
+ + |
+
+
+
+ + ++
+ Example +++
+namespace System
+namespace Microsoft.FSharp
+namespace Microsoft.FSharp.Quotations
+module Patterns
+
+from Microsoft.FSharp.Quotations
+val propInfo: Reflection.PropertyInfo
+type Console =
+ static member Beep: unit -> unit + 1 overload
+ static member Clear: unit -> unit
+ static member GetCursorPosition: unit -> struct (int * int)
+ static member MoveBufferArea: sourceLeft: int * sourceTop: int * sourceWidth: int * sourceHeight: int * targetLeft: int * targetTop: int -> unit + 1 overload
+ static member OpenStandardError: unit -> Stream + 1 overload
+ static member OpenStandardInput: unit -> Stream + 1 overload
+ static member OpenStandardOutput: unit -> Stream + 1 overload
+ static member Read: unit -> int
+ static member ReadKey: unit -> ConsoleKeyInfo + 1 overload
+ static member ReadLine: unit -> string
+ ...
+<summary>Represents the standard input, output, and error streams for console applications. This class cannot be inherited.</summary> property Console.Out: IO.TextWriter with get
+<summary>Gets the standard output stream.</summary> <returns>A <see cref="T:System.IO.TextWriter" /> that represents the standard output stream.</returns> active recognizer PropertyGet: Expr -> (Expr option * Reflection.PropertyInfo * Expr list) option
+union case Option.None: Option<'T>
+val pi: Reflection.PropertyInfo
+val failwith: message: string -> 'T
+Multiple items
+type Expr = + override Equals: obj: obj -> bool + member GetFreeVars: unit -> Var seq + member Substitute: substitution: (Var -> Expr option) -> Expr + member ToString: full: bool -> string + static member AddressOf: target: Expr -> Expr + static member AddressSet: target: Expr * value: Expr -> Expr + static member Application: functionExpr: Expr * argument: Expr -> Expr + static member Applications: functionExpr: Expr * arguments: Expr list list -> Expr + static member Call: methodInfo: MethodInfo * arguments: Expr list -> Expr + 1 overload + static member CallWithWitnesses: methodInfo: MethodInfo * methodInfoWithWitnesses: MethodInfo * witnesses: Expr list * arguments: Expr list -> Expr + 1 overload + ... -------------------- type Expr<'T> = + inherit Expr + member Raw: Expr static member Expr.PropertyGet: property: Reflection.PropertyInfo * ?indexerArgs: Expr list -> Expr
+
+
+ Evaluates to a quotation with the same structure as static member Expr.PropertyGet: obj: Expr * property: Reflection.PropertyInfo * ?indexerArgs: Expr list -> Expr <@ Console.Out @> .
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Expr.PropertyGet(obj, property, ?indexerArgs)
+ + + Parameters: +
Expr
+ -
+ The input object.
+
+ + + + property + + : + PropertyInfo
+ -
+ The description of the property.
+
+ + + + ?indexerArgs + + : + Expr list
+ -
+ List of indices for the property if it is an indexed property.
+
+ + + + Returns: + Expr
+
+ The resulting expression.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Builds an expression that represents reading a property of an object + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Expr.PropertySet(property, value, ?indexerArgs)
+ + + Parameters: +
PropertyInfo
+ -
+ The description of the property.
+
+ + + + value + + : + Expr
+ -
+ The value to set.
+
+ + + + ?indexerArgs + + : + Expr list
+ -
+ List of indices for the property if it is an indexed property.
+
+ + + + Returns: + Expr
+
+ The resulting expression.
+ + |
+
+
+
+ + ++
+ Example +++
+namespace System
+namespace System.Collections
+namespace System.Collections.Generic
+namespace Microsoft.FSharp
+namespace Microsoft.FSharp.Quotations
+module Patterns
+
+from Microsoft.FSharp.Quotations
+val propInfo: Reflection.PropertyInfo
+type Console =
+ static member Beep: unit -> unit + 1 overload
+ static member Clear: unit -> unit
+ static member GetCursorPosition: unit -> struct (int * int)
+ static member MoveBufferArea: sourceLeft: int * sourceTop: int * sourceWidth: int * sourceHeight: int * targetLeft: int * targetTop: int -> unit + 1 overload
+ static member OpenStandardError: unit -> Stream + 1 overload
+ static member OpenStandardInput: unit -> Stream + 1 overload
+ static member OpenStandardOutput: unit -> Stream + 1 overload
+ static member Read: unit -> int
+ static member ReadKey: unit -> ConsoleKeyInfo + 1 overload
+ static member ReadLine: unit -> string
+ ...
+<summary>Represents the standard input, output, and error streams for console applications. This class cannot be inherited.</summary> property Console.BackgroundColor: ConsoleColor with get, set
+<summary>Gets or sets the background color of the console.</summary> <exception cref="T:System.ArgumentException">The color specified in a set operation is not a valid member of <see cref="T:System.ConsoleColor" />.</exception> <exception cref="T:System.Security.SecurityException">The user does not have permission to perform this action.</exception> <exception cref="T:System.IO.IOException">An I/O error occurred.</exception> <returns>A value that specifies the background color of the console; that is, the color that appears behind each character. The default is black.</returns> [<Struct>]
+type ConsoleColor =
+ | Black = 0
+ | DarkBlue = 1
+ | DarkGreen = 2
+ | DarkCyan = 3
+ | DarkRed = 4
+ | DarkMagenta = 5
+ | DarkYellow = 6
+ | Gray = 7
+ | DarkGray = 8
+ | Blue = 9
+ ...
+<summary>Specifies constants that define foreground and background colors for the console.</summary> field ConsoleColor.Red: ConsoleColor = 12
+active recognizer PropertySet: Expr -> (Expr option * Reflection.PropertyInfo * Expr list * Expr) option
+union case Option.None: Option<'T>
+val pi: Reflection.PropertyInfo
+val failwith: message: string -> 'T
+Multiple items
+type Expr = + override Equals: obj: obj -> bool + member GetFreeVars: unit -> Var seq + member Substitute: substitution: (Var -> Expr option) -> Expr + member ToString: full: bool -> string + static member AddressOf: target: Expr -> Expr + static member AddressSet: target: Expr * value: Expr -> Expr + static member Application: functionExpr: Expr * argument: Expr -> Expr + static member Applications: functionExpr: Expr * arguments: Expr list list -> Expr + static member Call: methodInfo: MethodInfo * arguments: Expr list -> Expr + 1 overload + static member CallWithWitnesses: methodInfo: MethodInfo * methodInfoWithWitnesses: MethodInfo * witnesses: Expr list * arguments: Expr list -> Expr + 1 overload + ... -------------------- type Expr<'T> = + inherit Expr + member Raw: Expr static member Expr.PropertySet: property: Reflection.PropertyInfo * value: Expr * ?indexerArgs: Expr list -> Expr
+static member Expr.PropertySet: obj: Expr * property: Reflection.PropertyInfo * value: Expr * ?indexerArgs: Expr list -> Expr field ConsoleColor.Blue: ConsoleColor = 9
+
+
+ Evaluates to a quotation with the same structure as <@ Console.BackgroundColor <- ConsoleColor.Blue @> .
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Expr.PropertySet(obj, property, value, ?indexerArgs)
+ + + Parameters: +
Expr
+ -
+ The input object.
+
+ + + + property + + : + PropertyInfo
+ -
+ The description of the property.
+
+ + + + value + + : + Expr
+ -
+ The value to set.
+
+ + + + ?indexerArgs + + : + Expr list
+ -
+ List of indices for the property if it is an indexed property.
+
+ + + + Returns: + Expr
+
+ The resulting expression.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Builds an expression that represents writing to a property of an object + + |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+Multiple items
+namespace Microsoft.FSharp -------------------- namespace FSharp namespace Microsoft.FSharp.Quotations
+Multiple items
+type Expr = + override Equals: obj: obj -> bool + member GetFreeVars: unit -> Var seq + member Substitute: substitution: (Var -> Expr option) -> Expr + member ToString: full: bool -> string + static member AddressOf: target: Expr -> Expr + static member AddressSet: target: Expr * value: Expr -> Expr + static member Application: functionExpr: Expr * argument: Expr -> Expr + static member Applications: functionExpr: Expr * arguments: Expr list list -> Expr + static member Call: methodInfo: MethodInfo * arguments: Expr list -> Expr + 1 overload + static member CallWithWitnesses: methodInfo: MethodInfo * methodInfoWithWitnesses: MethodInfo * witnesses: Expr list * arguments: Expr list -> Expr + 1 overload + ... -------------------- type Expr<'T> = + inherit Expr + member Raw: Expr static member Expr.QuoteRaw: inner: Expr -> Expr
+
+
+ Evaluates to a quotation with the same structure as <@ <@ 1 @> @> .
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Builds an expression that represents a nested typed quotation literal + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Expr.RegisterReflectedDefinitions(assembly, resource, serializedValue, referencedTypes)
+ + + Parameters: +
Assembly
+ -
+ The assembly associated with the resource.
+
+ + + + resource + + : + string
+ -
+ The unique name for the resources being added.
+
+ + + + serializedValue + + : + byte[]
+ -
+ The serialized resource to register with the environment.
+
+ + + + referencedTypes + + : + Type[]
+ -
+ The type definitions referenced.
+
+ + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Permits interactive environments such as F# Interactive + to explicitly register new pickled resources that represent persisted + top level definitions. + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Expr.RegisterReflectedDefinitions(assembly, resource, serializedValue)
+ + + Parameters: +
Assembly
+ -
+ The assembly associated with the resource.
+
+ + + + resource + + : + string
+ -
+ The unique name for the resources being added.
+
+ + + + serializedValue + + : + byte[]
+ -
+ The serialized resource to register with the environment.
+
+ + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Permits interactive environments such as F# Interactive + to explicitly register new pickled resources that represent persisted + top level definitions. + + |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Builds an expression that represents the sequential execution of one expression followed by another + + |
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+namespace System
+namespace Microsoft.FSharp
+namespace Microsoft.FSharp.Quotations
+Multiple items
+type Expr = + override Equals: obj: obj -> bool + member GetFreeVars: unit -> Var seq + member Substitute: substitution: (Var -> Expr option) -> Expr + member ToString: full: bool -> string + static member AddressOf: target: Expr -> Expr + static member AddressSet: target: Expr * value: Expr -> Expr + static member Application: functionExpr: Expr * argument: Expr -> Expr + static member Applications: functionExpr: Expr * arguments: Expr list list -> Expr + static member Call: methodInfo: MethodInfo * arguments: Expr list -> Expr + 1 overload + static member CallWithWitnesses: methodInfo: MethodInfo * methodInfoWithWitnesses: MethodInfo * witnesses: Expr list * arguments: Expr list -> Expr + 1 overload + ... -------------------- type Expr<'T> = + inherit Expr + member Raw: Expr static member Expr.TryFinally: body: Expr * compensation: Expr -> Expr
+type Console =
+ static member Beep: unit -> unit + 1 overload
+ static member Clear: unit -> unit
+ static member GetCursorPosition: unit -> struct (int * int)
+ static member MoveBufferArea: sourceLeft: int * sourceTop: int * sourceWidth: int * sourceHeight: int * targetLeft: int * targetTop: int -> unit + 1 overload
+ static member OpenStandardError: unit -> Stream + 1 overload
+ static member OpenStandardInput: unit -> Stream + 1 overload
+ static member OpenStandardOutput: unit -> Stream + 1 overload
+ static member Read: unit -> int
+ static member ReadKey: unit -> ConsoleKeyInfo + 1 overload
+ static member ReadLine: unit -> string
+ ...
+<summary>Represents the standard input, output, and error streams for console applications. This class cannot be inherited.</summary> Console.WriteLine() : unit
+
+
+ Evaluates to a quotation with the same structure as (+0 other overloads) Console.WriteLine(value: uint64) : unit (+0 other overloads) Console.WriteLine(value: uint32) : unit (+0 other overloads) Console.WriteLine(value: string) : unit (+0 other overloads) Console.WriteLine(value: float32) : unit (+0 other overloads) Console.WriteLine(value: obj) : unit (+0 other overloads) Console.WriteLine(value: int64) : unit (+0 other overloads) Console.WriteLine(value: int) : unit (+0 other overloads) Console.WriteLine(value: float) : unit (+0 other overloads) Console.WriteLine(value: decimal) : unit (+0 other overloads) <@ try 1+1 finally Console.WriteLine("finally") @> .
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Expr.TryGetReflectedDefinition(methodBase)
+ + + Parameters: +
MethodBase
+ -
+ The description of the method to find.
+
+ + + + Returns: + Expr option
+
+ The reflection definition or None if a match could not be found.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Try and find a stored reflection definition for the given method. Stored reflection
+ definitions are added to an F# assembly through the use of the [ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Expr.TryWith(body, filterVar, filterBody, catchVar, catchBody)
+ + + Parameters: +
Expr
+ -
+ The body of the try expression.
+
+ + + + filterVar + + : + Var
+ -
+
+
+ + + + filterBody + + : + Expr
+ -
+
+
+ + + + catchVar + + : + Var
+ -
+ The variable to bind to a caught exception.
+
+ + + + catchBody + + : + Expr
+ -
+ The expression evaluated when an exception is caught.
+
+ + + + Returns: + Expr
+
+ The resulting expression.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Builds an expression that represents a try/with construct for exception filtering and catching. + + |
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+Multiple items
+namespace Microsoft.FSharp -------------------- namespace FSharp namespace Microsoft.FSharp.Quotations
+val tupExpr: Expr<int * int * int>
+Multiple items
+type Expr = + override Equals: obj: obj -> bool + member GetFreeVars: unit -> Var seq + member Substitute: substitution: (Var -> Expr option) -> Expr + member ToString: full: bool -> string + static member AddressOf: target: Expr -> Expr + static member AddressSet: target: Expr * value: Expr -> Expr + static member Application: functionExpr: Expr * argument: Expr -> Expr + static member Applications: functionExpr: Expr * arguments: Expr list list -> Expr + static member Call: methodInfo: MethodInfo * arguments: Expr list -> Expr + 1 overload + static member CallWithWitnesses: methodInfo: MethodInfo * methodInfoWithWitnesses: MethodInfo * witnesses: Expr list * arguments: Expr list -> Expr + 1 overload + ... -------------------- type Expr<'T> = + inherit Expr + member Raw: Expr static member Expr.TupleGet: tuple: Expr * index: int -> Expr
+
+
+ Evaluates to quotation that displays as TupleGet (NewTuple (Value (1), Value (2), Value (3)), 1) .
+
+
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+Multiple items
+namespace Microsoft.FSharp -------------------- namespace FSharp namespace Microsoft.FSharp.Quotations
+Multiple items
+val obj: obj -------------------- type obj = System.Object val box: value: 'T -> obj
+Multiple items
+type Expr = + override Equals: obj: obj -> bool + member GetFreeVars: unit -> Var seq + member Substitute: substitution: (Var -> Expr option) -> Expr + member ToString: full: bool -> string + static member AddressOf: target: Expr -> Expr + static member AddressSet: target: Expr * value: Expr -> Expr + static member Application: functionExpr: Expr * argument: Expr -> Expr + static member Applications: functionExpr: Expr * arguments: Expr list list -> Expr + static member Call: methodInfo: MethodInfo * arguments: Expr list -> Expr + 1 overload + static member CallWithWitnesses: methodInfo: MethodInfo * methodInfoWithWitnesses: MethodInfo * witnesses: Expr list * arguments: Expr list -> Expr + 1 overload + ... -------------------- type Expr<'T> = + inherit Expr + member Raw: Expr static member Expr.TypeTest: source: Expr * target: System.Type -> Expr
+val typeof<'T> : System.Type
+Multiple items
+
+
+ Evaluates to quotation that displays as val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = + int TypeTest (Int32, PropertyGet (None, obj, [])) .
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Expr.UnionCaseTest(source, unionCase)
+ + + Parameters: +
Expr
+ -
+ The expression to test.
+
+ + + + unionCase + + : + UnionCaseInfo
+ -
+ The description of the union case.
+
+ + + + Returns: + Expr
+
+ The resulting expression.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Builds an expression that represents a test of a value is of a particular union case + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Expr.Value(value)
+ + + Parameters: +
'T
+ -
+ The typed value.
+
+ + + + Returns: + Expr
+
+ + |
+
+
+
+ + ++
+ Example +++
+Multiple items
+namespace Microsoft.FSharp -------------------- namespace FSharp namespace Microsoft.FSharp.Quotations
+Multiple items
+type Expr = + override Equals: obj: obj -> bool + member GetFreeVars: unit -> Var seq + member Substitute: substitution: (Var -> Expr option) -> Expr + member ToString: full: bool -> string + static member AddressOf: target: Expr -> Expr + static member AddressSet: target: Expr * value: Expr -> Expr + static member Application: functionExpr: Expr * argument: Expr -> Expr + static member Applications: functionExpr: Expr * arguments: Expr list list -> Expr + static member Call: methodInfo: MethodInfo * arguments: Expr list -> Expr + 1 overload + static member CallWithWitnesses: methodInfo: MethodInfo * methodInfoWithWitnesses: MethodInfo * witnesses: Expr list * arguments: Expr list -> Expr + 1 overload + ... -------------------- type Expr<'T> = + inherit Expr + member Raw: Expr static member Expr.Value: value: 'T -> Expr
+
+
+ Evaluates to a quotation with the same structure as static member Expr.Value: value: obj * expressionType: System.Type -> Expr <@ 1 @> .
+
+
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Builds an expression that represents a constant value of a particular type + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Expr.ValueWithName(value, expressionType, name)
+ + + Parameters: +
obj
+ -
+ The untyped object.
+
+ + + + expressionType + + : + Type
+ -
+ The type of the object.
+
+ + + + name + + : + string
+ -
+ The name of the variable.
+
+ + + + Returns: + Expr
+
+ The resulting expression.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Builds an expression that represents a constant value of a particular type, arising from a variable of the given name + + |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Builds an expression that represents a constant value, arising from a variable of the given name + + |
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+Multiple items
+namespace Microsoft.FSharp -------------------- namespace FSharp namespace Microsoft.FSharp.Quotations
+val vVar: Var
+Multiple items
+type Var = + interface IComparable + new: name: string * typ: Type * ?isMutable: bool -> Var + static member Global: name: string * typ: Type -> Var + member IsMutable: bool + member Name: string + member Type: Type -------------------- new: name: string * typ: System.Type * ?isMutable: bool -> Var val typeof<'T> : System.Type
+Multiple items
+val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = + int Multiple items
+type Expr = + override Equals: obj: obj -> bool + member GetFreeVars: unit -> Var seq + member Substitute: substitution: (Var -> Expr option) -> Expr + member ToString: full: bool -> string + static member AddressOf: target: Expr -> Expr + static member AddressSet: target: Expr * value: Expr -> Expr + static member Application: functionExpr: Expr * argument: Expr -> Expr + static member Applications: functionExpr: Expr * arguments: Expr list list -> Expr + static member Call: methodInfo: MethodInfo * arguments: Expr list -> Expr + 1 overload + static member CallWithWitnesses: methodInfo: MethodInfo * methodInfoWithWitnesses: MethodInfo * witnesses: Expr list * arguments: Expr list -> Expr + 1 overload + ... -------------------- type Expr<'T> = + inherit Expr + member Raw: Expr static member Expr.Var: variable: Var -> Expr
+
+
+ Evaluates to a quotation displayed as v .
+
+
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+Multiple items
+namespace Microsoft.FSharp -------------------- namespace FSharp namespace Microsoft.FSharp.Quotations
+val vVar: Var
+Multiple items
+type Var = + interface IComparable + new: name: string * typ: Type * ?isMutable: bool -> Var + static member Global: name: string * typ: Type -> Var + member IsMutable: bool + member Name: string + member Type: Type -------------------- new: name: string * typ: System.Type * ?isMutable: bool -> Var val typeof<'T> : System.Type
+Multiple items
+val int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = + int Multiple items
+type Expr = + override Equals: obj: obj -> bool + member GetFreeVars: unit -> Var seq + member Substitute: substitution: (Var -> Expr option) -> Expr + member ToString: full: bool -> string + static member AddressOf: target: Expr -> Expr + static member AddressSet: target: Expr * value: Expr -> Expr + static member Application: functionExpr: Expr * argument: Expr -> Expr + static member Applications: functionExpr: Expr * arguments: Expr list list -> Expr + static member Call: methodInfo: MethodInfo * arguments: Expr list -> Expr + 1 overload + static member CallWithWitnesses: methodInfo: MethodInfo * methodInfoWithWitnesses: MethodInfo * witnesses: Expr list * arguments: Expr list -> Expr + 1 overload + ... -------------------- type Expr<'T> = + inherit Expr + member Raw: Expr static member Expr.VarSet: variable: Var * value: Expr -> Expr
+
+
+ Evaluates to a quotation displayed as VarSet (v, Value (5)) .
+
+
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+Multiple items
+namespace Microsoft.FSharp -------------------- namespace FSharp namespace Microsoft.FSharp.Quotations
+val guardExpr: Expr<bool>
+val bodyExpr: Expr<unit>
+Multiple items
+type Expr = + override Equals: obj: obj -> bool + member GetFreeVars: unit -> Var seq + member Substitute: substitution: (Var -> Expr option) -> Expr + member ToString: full: bool -> string + static member AddressOf: target: Expr -> Expr + static member AddressSet: target: Expr * value: Expr -> Expr + static member Application: functionExpr: Expr * argument: Expr -> Expr + static member Applications: functionExpr: Expr * arguments: Expr list list -> Expr + static member Call: methodInfo: MethodInfo * arguments: Expr list -> Expr + 1 overload + static member CallWithWitnesses: methodInfo: MethodInfo * methodInfoWithWitnesses: MethodInfo * witnesses: Expr list * arguments: Expr list -> Expr + 1 overload + ... -------------------- type Expr<'T> = + inherit Expr + member Raw: Expr static member Expr.WhileLoop: guard: Expr * body: Expr -> Expr
+
+
+ Evaluates to a quotation with the same structure as <@ while true do () @> .
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Expr.WithValue(value, expressionType, definition)
+ + + Parameters: +
obj
+ -
+ The untyped object.
+
+ + + + expressionType + + : + Type
+ -
+ The type of the object.
+
+ + + + definition + + : + Expr
+ -
+ The definition of the value being quoted.
+
+ + + + Returns: + Expr
+
+ The resulting expression.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Builds an expression that represents a value and its associated reflected definition as a quotation + + |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Builds an expression that represents a value and its associated reflected definition as a quotation + + |
+
+ Information at the binding site of a variable +
++ Constructor + | ++ Description + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ Var(name, typ, ?isMutable)
+ + + Parameters: +
string
+ -
+ The declared name of the variable.
+
+ + + + typ + + : + Type
+ -
+ The type associated with the variable.
+
+ + + + ?isMutable + + : + bool
+ -
+ Indicates if the variable represents a mutable storage location. Default is false.
+
+ + + + Returns: + Var
+
+ The created variable.
+ + |
+
+
+
+ + ++
+ Example +++
+Multiple items
+namespace Microsoft.FSharp -------------------- namespace FSharp namespace Microsoft.FSharp.Quotations
+namespace Microsoft.FSharp
+module Patterns
+
+from Microsoft.FSharp.Quotations
+val valueVar: 'a * System.Type
+Multiple items
+active recognizer Var: Expr -> Var option -------------------- type Var = + interface IComparable + new: name: string * typ: Type * ?isMutable: bool -> Var + static member Global: name: string * typ: Type -> Var + member IsMutable: bool + member Name: string + member Type: Type -------------------- new: name: string * typ: System.Type * ?isMutable: bool -> Var val typeof<'T> : System.Type
+Multiple items
+
+
+ Evaluates to a new quotation variable with the given name and typeval int: value: 'T -> int (requires member op_Explicit) -------------------- type int = int32 -------------------- type int<'Measure> = + int .
+
+
+ |
+
+ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+Multiple items
+namespace Microsoft.FSharp -------------------- namespace FSharp namespace Microsoft.FSharp.Quotations
+namespace Microsoft.FSharp
+module Patterns
+
+from Microsoft.FSharp.Quotations
+val v: obj
+active recognizer Lambda: Expr -> (Var * Expr) option
+val v: Var
+val body: Expr
+property Var.IsMutable: bool with get
+val failwith: message: string -> 'T
+
+
+ Evaluates to false .
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+Multiple items
+namespace Microsoft.FSharp -------------------- namespace FSharp namespace Microsoft.FSharp.Quotations
+namespace Microsoft.FSharp
+module Patterns
+
+from Microsoft.FSharp.Quotations
+val v: obj
+active recognizer Lambda: Expr -> (Var * Expr) option
+val v: Var
+val body: Expr
+property Var.Name: string with get
+val failwith: message: string -> 'T
+
+
+ Evaluates to "v"
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+Multiple items
+namespace Microsoft.FSharp -------------------- namespace FSharp namespace Microsoft.FSharp.Quotations
+namespace Microsoft.FSharp
+module Patterns
+
+from Microsoft.FSharp.Quotations
+val v: obj
+active recognizer Lambda: Expr -> (Var * Expr) option
+val v: Var
+val body: Expr
+property Var.Type: System.Type with get
+val failwith: message: string -> 'T
+
+
+ Evaluates to typeof<int>
+
+ |
+
+ Static member + | ++ Description + | +
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Fetches or create a new variable with the given name and type from a global pool of shared variables + indexed by name and type + + |
+
+ Contains a set of primitive F# active patterns to analyze F# expression objects +
++ Active pattern + | ++ Description + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ (|CallWithWitnesses|_|) input
+ + + Parameters: +
Expr
+ -
+ The input expression to match against.
+
+ + + + Returns: + (Expr option * MethodInfo * MethodInfo * Expr list * Expr list) option
+
+ When successful, the pattern binds the object, method, witness-argument and argument sub-expressions of the input expression
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + An active pattern to recognize expressions that represent calls to static and instance methods, and functions defined in modules, including witness arguments + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ (|Call|_|) input
+ + + Parameters: +
Expr
+ -
+ The input expression to match against.
+
+ + + + Returns: + (Expr option * MethodInfo * Expr list) option
+
+ When successful, the pattern binds the object, method and argument sub-expressions of the input expression
+ + |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ (|NewObject|_|) input
+ + + Parameters: +
Expr
+ -
+ The input expression to match against.
+
+ + + + Returns: + (ConstructorInfo * Expr list) option
+
+ When successful, the pattern binds the constructor and arguments of the input expression
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + An active pattern to recognize expressions that represent invocation of object constructors + + |
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ (|NewUnionCase|_|) input
+ + + Parameters: +
Expr
+ -
+ The input expression to match against.
+
+ + + + Returns: + (UnionCaseInfo * Expr list) option
+
+ When successful, the pattern binds the union case and field values of the input expression
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + An active pattern to recognize expressions that represent construction of particular union case values + + |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ (|PropertyGet|_|) input
+ + + Parameters: +
Expr
+ -
+ The input expression to match against.
+
+ + + + Returns: + (Expr option * PropertyInfo * Expr list) option
+
+ When successful, the pattern binds the object, property and indexer arguments of the input expression
+ + |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ (|PropertySet|_|) input
+ + + Parameters: +
Expr
+ -
+ The input expression to match against.
+
+ + + + Returns: + (Expr option * PropertyInfo * Expr list * Expr) option
+
+ When successful, the pattern binds the object, property, indexer arguments and setter value of the input expression
+ + |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+
+
+ Full Usage:
+
+ (|TryWith|_|) input
+ + + Parameters: +
Expr
+ -
+ The input expression to match against.
+
+ + + + Returns: + (Expr * Var * Expr * Var * Expr) option
+
+ When successful, the pattern binds the body, exception variable, filter expression and catch expression of the input expression
+ + |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+ + | ++ + | +
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ (|UnionCaseTest|_|) input
+ + + Parameters: +
Expr
+ -
+ The input expression to match against.
+
+ + + + Returns: + (Expr * UnionCaseInfo) option
+
+ When successful, the pattern binds the expression and union case being tested
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + An active pattern to recognize expressions that represent a test if a value is of a particular union case + + |
+
+
+
+
+
+
+
+ |
+ + + | +
+ + | ++ + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+
+
+
+
+
+ |
+ + + | +
+ + Library functionality for F# quotations. + See also F# Code Quotations in the F# Language Guide. + +
++ Type/Module + | ++ Description + | +
+ + + + DerivedPatterns + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Contains a set of derived F# active patterns to analyze F# expression objects + + |
+
+ + | ++ + | +
+ + + + Expr<'T> + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Type-carrying quoted expressions. Expressions are generated either + by quotations in source text or programatically + + |
+
+ + + + ExprShape + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Active patterns for traversing, visiting, rebuilding and transforming expressions in a generic way + + |
+
+ + + + Patterns + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Contains a set of primitive F# active patterns to analyze F# expression objects + + |
+
+ + | ++ + | +
+ Defines further accessing additional information about F# types and F# values at runtime. +
++ Type extension + | ++ Description + | +||
+
+
+
+
+
+
+
+ Full Usage:
+
+ FSharpValue.GetExceptionFields(exn, ?allowAccessToPrivateRepresentation)
+ + + Parameters: +
obj
+ -
+ The exception instance.
+
+ + + + ?allowAccessToPrivateRepresentation + + : + bool
+ -
+ Optional flag that denotes accessibility of the private representation.
+
+ + + + Returns: + obj[]
+
+ The fields from the given exception.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Reads all the fields from a value built using an instance of an F# exception declaration + + |
+
+ + ArgumentException + + | ++ Thrown when the input type is not an F# exception. + | +
+
+
+
+ FSharpType.GetExceptionFields(exceptionType, ?allowAccessToPrivateRepresentation)
+
+
+
+
+ FSharpType.GetExceptionFields(exceptionType, ?allowAccessToPrivateRepresentation)
+ Type
+ -
+ The exception type to read.
+
+ bool
+ -
+ Optional flag that denotes accessibility of the private representation.
+
+ PropertyInfo[]
+
+ An array containing the PropertyInfo of each field in the exception.
+ + Reads all the fields from an F# exception declaration, in declaration order +
+
+ Assumes exceptionType
is an exception representation type. If not, ArgumentException is raised.
+
+ Extended Type:
+ FSharpType
+
Type
+ + The exception type to read. +
+bool
+ + Optional flag that denotes accessibility of the private representation. +
+PropertyInfo[]
+ + An array containing the PropertyInfo of each field in the exception. +
++ + ArgumentException + + | ++ Thrown if the given type is not an exception. + | +
+
+
+
+ FSharpValue.GetRecordFields(record, ?allowAccessToPrivateRepresentation)
+
+
+
+
+ FSharpValue.GetRecordFields(record, ?allowAccessToPrivateRepresentation)
+ obj
+ -
+ The record object.
+
+ bool
+ -
+ Optional flag that denotes accessibility of the private representation.
+
+ obj[]
+
+ The array of fields from the record.
+ + Assumes the given input is a record value. If not, ArgumentException is raised. +
+
+ Extended Type:
+ FSharpValue
+
obj
+ + The record object. +
+bool
+ + Optional flag that denotes accessibility of the private representation. +
+obj[]
+ + The array of fields from the record. +
++ + ArgumentException + + | ++ Thrown when the input type is not a record type. + | +
+
+
+
+ FSharpType.GetRecordFields(recordType, ?allowAccessToPrivateRepresentation)
+
+
+
+
+ FSharpType.GetRecordFields(recordType, ?allowAccessToPrivateRepresentation)
+ Type
+ -
+ The input record type.
+
+ bool
+ -
+ Optional flag that denotes accessibility of the private representation.
+
+ PropertyInfo[]
+
+ An array of descriptions of the properties of the record type.
+ + Assumes the given input is a record value. If not, ArgumentException is raised. +
+
+ Extended Type:
+ FSharpType
+
Type
+ + The input record type. +
+bool
+ + Optional flag that denotes accessibility of the private representation. +
+PropertyInfo[]
+ + An array of descriptions of the properties of the record type. +
+
+
+
+
+ FSharpType.GetUnionCases(unionType, ?allowAccessToPrivateRepresentation)
+
+
+
+
+ FSharpType.GetUnionCases(unionType, ?allowAccessToPrivateRepresentation)
+ Type
+ -
+ The input union type.
+
+ bool
+ -
+ Optional flag that denotes accessibility of the private representation.
+
+ UnionCaseInfo[]
+
+ An array of descriptions of the cases of the given union type.
+ + Assumes the given type is a union type. If not, ArgumentException is raised during pre-computation. +
+
+ Extended Type:
+ FSharpType
+
Type
+ + The input union type. +
+bool
+ + Optional flag that denotes accessibility of the private representation. +
+UnionCaseInfo[]
+ + An array of descriptions of the cases of the given union type. +
++ + ArgumentException + + | ++ Thrown when the input type is not a union type. + | +
+
+
+
+ FSharpValue.GetUnionFields(value, unionType, ?allowAccessToPrivateRepresentation)
+
+
+
+
+ FSharpValue.GetUnionFields(value, unionType, ?allowAccessToPrivateRepresentation)
+ obj
+ -
+ The input union case.
+
+ Type
+ -
+ The union type containing the value.
+
+ bool
+ -
+ Optional flag that denotes accessibility of the private representation.
+
+ UnionCaseInfo * obj[]
+
+ The description of the union case and its fields.
+ + Assumes the given input is a union case value. If not, ArgumentException is raised. + + If the type is not given, then the runtime type of the input object is used to identify the + relevant union type. The type should always be given if the input object may be null. For example, + option values may be represented using the 'null'. +
+
+ Extended Type:
+ FSharpValue
+
obj
+ + The input union case. +
+Type
+ + The union type containing the value. +
+bool
+ + Optional flag that denotes accessibility of the private representation. +
+UnionCaseInfo * obj[]
+ + The description of the union case and its fields. +
++ + ArgumentException + + | ++ Thrown when the input type is not a union case value. + | +
+
+
+
+ FSharpType.IsExceptionRepresentation(exceptionType, ?allowAccessToPrivateRepresentation)
+
+
+
+
+ FSharpType.IsExceptionRepresentation(exceptionType, ?allowAccessToPrivateRepresentation)
+ Type
+ -
+ The type to check.
+
+ bool
+ -
+ Optional flag that denotes accessibility of the private representation.
+
+ bool
+
+ True if the type check is an F# exception.
+
+ Returns true if the exceptionType
is a representation of an F# exception declaration
+
+ Extended Type:
+ FSharpType
+
Type
+ + The type to check. +
+bool
+ + Optional flag that denotes accessibility of the private representation. +
+bool
+ + True if the type check is an F# exception. +
+
+
+
+
+ FSharpType.IsRecord(typ, ?allowAccessToPrivateRepresentation)
+
+
+
+
+ FSharpType.IsRecord(typ, ?allowAccessToPrivateRepresentation)
+ Type
+ -
+ The type to check.
+
+ bool
+ -
+ Optional flag that denotes accessibility of the private representation.
+
+ bool
+
+ True if the type check succeeds.
+
+ Extended Type:
+ FSharpType
+
Type
+ + The type to check. +
+bool
+ + Optional flag that denotes accessibility of the private representation. +
+bool
+ + True if the type check succeeds. +
+
+
+
+
+ FSharpType.IsUnion(typ, ?allowAccessToPrivateRepresentation)
+
+
+
+
+ FSharpType.IsUnion(typ, ?allowAccessToPrivateRepresentation)
+ Type
+ -
+ The type to check.
+
+ bool
+ -
+ Optional flag that denotes accessibility of the private representation.
+
+ bool
+
+ True if the type check succeeds.
+
+ Returns true if the typ
is a representation of an F# union type or the runtime type of a value of that type
+
+ Extended Type:
+ FSharpType
+
Type
+ + The type to check. +
+bool
+ + Optional flag that denotes accessibility of the private representation. +
+bool
+ + True if the type check succeeds. +
+
+
+
+
+ FSharpValue.MakeRecord(recordType, values, ?allowAccessToPrivateRepresentation)
+
+
+
+
+ FSharpValue.MakeRecord(recordType, values, ?allowAccessToPrivateRepresentation)
+ Type
+ -
+ The type of record to make.
+
+ obj[]
+ -
+ The array of values to initialize the record.
+
+ bool
+ -
+ Optional flags that denotes accessibility of the private representation.
+
+ obj
+
+ The created record.
+ + Assumes the given input is a record type. +
+
+ Extended Type:
+ FSharpValue
+
Type
+ + The type of record to make. +
+obj[]
+ + The array of values to initialize the record. +
+bool
+ + Optional flags that denotes accessibility of the private representation. +
+obj
+ + The created record. +
++ + ArgumentException + + | ++ Thrown when the input type is not a record type. + | +
+
+
+
+ FSharpValue.MakeUnion(unionCase, args, ?allowAccessToPrivateRepresentation)
+
+
+
+
+ FSharpValue.MakeUnion(unionCase, args, ?allowAccessToPrivateRepresentation)
+ UnionCaseInfo
+ -
+ The description of the union case to create.
+
+ obj[]
+ -
+ The array of arguments to construct the given case.
+
+ bool
+ -
+ Optional flag that denotes accessibility of the private representation.
+
+ obj
+
+ The constructed union case.
+
+ Extended Type:
+ FSharpValue
+
UnionCaseInfo
+ + The description of the union case to create. +
+obj[]
+ + The array of arguments to construct the given case. +
+bool
+ + Optional flag that denotes accessibility of the private representation. +
+obj
+ + The constructed union case. +
+
+
+
+
+ FSharpValue.PreComputeRecordConstructor(recordType, ?allowAccessToPrivateRepresentation)
+
+
+
+
+ FSharpValue.PreComputeRecordConstructor(recordType, ?allowAccessToPrivateRepresentation)
+ Type
+ -
+ The type of record to construct.
+
+ bool
+ -
+ Optional flag that denotes accessibility of the private representation.
+
+ obj[] -> obj
+
+ A function to construct records of the given type.
+ + Assumes the given type is a RecordType. + If not, ArgumentException is raised during pre-computation. +
+
+ Extended Type:
+ FSharpValue
+
Type
+ + The type of record to construct. +
+bool
+ + Optional flag that denotes accessibility of the private representation. +
++ + ArgumentException + + | ++ Thrown when the input type is not a record type. + | +
+
+
+
+ FSharpValue.PreComputeRecordConstructorInfo(recordType, ?allowAccessToPrivateRepresentation)
+
+
+
+
+ FSharpValue.PreComputeRecordConstructorInfo(recordType, ?allowAccessToPrivateRepresentation)
+ Type
+ -
+ The record type.
+
+ bool
+ -
+ Optional flag that denotes accessibility of the private representation.
+
+ ConstructorInfo
+
+ A ConstructorInfo for the given record type.
+
+ Extended Type:
+ FSharpValue
+
Type
+ + The record type. +
+bool
+ + Optional flag that denotes accessibility of the private representation. +
+ConstructorInfo
+ + A ConstructorInfo for the given record type. +
+
+
+
+
+ FSharpValue.PreComputeRecordReader(recordType, ?allowAccessToPrivateRepresentation)
+
+
+
+
+ FSharpValue.PreComputeRecordReader(recordType, ?allowAccessToPrivateRepresentation)
+ Type
+ -
+ The type of record to read.
+
+ bool
+ -
+ Optional flag that denotes accessibility of the private representation.
+
+ obj -> obj[]
+
+ An optimized reader for the given record type.
+ + Precompute a function for reading all the fields from a record. The fields are returned in the + same order as the fields reported by a call to Microsoft.FSharp.Reflection.Type.GetInfo for + this type. +
++ Assumes the given type is a RecordType. + If not, ArgumentException is raised during pre-computation. + + Using the computed function will typically be faster than executing a corresponding call to Value.GetInfo + because the path executed by the computed function is optimized given the knowledge that it will be + used to read values of the given type. +
+
+ Extended Type:
+ FSharpValue
+
Type
+ + The type of record to read. +
+bool
+ + Optional flag that denotes accessibility of the private representation. +
++ + ArgumentException + + | ++ Thrown when the input type is not a record type. + | +
+
+
+
+ FSharpValue.PreComputeUnionConstructor(unionCase, ?allowAccessToPrivateRepresentation)
+
+
+
+
+ FSharpValue.PreComputeUnionConstructor(unionCase, ?allowAccessToPrivateRepresentation)
+ UnionCaseInfo
+ -
+ The description of the union case.
+
+ bool
+ -
+ Optional flag that denotes accessibility of the private representation.
+
+ obj[] -> obj
+
+ A function for constructing values of the given union case.
+ + Precompute a function for constructing a discriminated union value for a particular union case. +
+
+ Extended Type:
+ FSharpValue
+
UnionCaseInfo
+ + The description of the union case. +
+bool
+ + Optional flag that denotes accessibility of the private representation. +
+
+
+
+
+ FSharpValue.PreComputeUnionConstructorInfo(unionCase, ?allowAccessToPrivateRepresentation)
+
+
+
+
+ FSharpValue.PreComputeUnionConstructorInfo(unionCase, ?allowAccessToPrivateRepresentation)
+ UnionCaseInfo
+ -
+ The description of the union case.
+
+ bool
+ -
+ Optional flag that denotes accessibility of the private representation.
+
+ MethodInfo
+
+ The description of the constructor of the given union case.
+
+ Extended Type:
+ FSharpValue
+
UnionCaseInfo
+ + The description of the union case. +
+bool
+ + Optional flag that denotes accessibility of the private representation. +
+MethodInfo
+ + The description of the constructor of the given union case. +
+
+
+
+
+ FSharpValue.PreComputeUnionReader(unionCase, ?allowAccessToPrivateRepresentation)
+
+
+
+
+ FSharpValue.PreComputeUnionReader(unionCase, ?allowAccessToPrivateRepresentation)
+ UnionCaseInfo
+ -
+ The description of the union case to read.
+
+ bool
+ -
+ Optional flag that denotes accessibility of the private representation.
+
+ obj -> obj[]
+
+ A function to for reading the fields of the given union case.
+ + Precompute a function for reading all the fields for a particular discriminator case of a union type +
++ Using the computed function will typically be faster than executing a corresponding call to GetFields +
+
+ Extended Type:
+ FSharpValue
+
UnionCaseInfo
+ + The description of the union case to read. +
+bool
+ + Optional flag that denotes accessibility of the private representation. +
+
+
+
+
+ FSharpValue.PreComputeUnionTagMemberInfo(unionType, ?allowAccessToPrivateRepresentation)
+
+
+
+
+ FSharpValue.PreComputeUnionTagMemberInfo(unionType, ?allowAccessToPrivateRepresentation)
+ Type
+ -
+ The type of union to read.
+
+ bool
+ -
+ Optional flag that denotes accessibility of the private representation.
+
+ MemberInfo
+
+ The description of the union case reader.
+ + Precompute a property or static method for reading an integer representing the case tag of a union type. +
+
+ Extended Type:
+ FSharpValue
+
Type
+ + The type of union to read. +
+bool
+ + Optional flag that denotes accessibility of the private representation. +
+MemberInfo
+ + The description of the union case reader. +
+
+
+
+
+ FSharpValue.PreComputeUnionTagReader(unionType, ?allowAccessToPrivateRepresentation)
+
+
+
+
+ FSharpValue.PreComputeUnionTagReader(unionType, ?allowAccessToPrivateRepresentation)
+ Type
+ -
+ The type of union to optimize reading.
+
+ bool
+ -
+ Optional flag that denotes accessibility of the private representation.
+
+ obj -> int
+
+ An optimized function to read the tags of the given union type.
+ + Assumes the given type is a union type. + If not, ArgumentException is raised during pre-computation. +
++ Using the computed function is more efficient than calling GetUnionCase + because the path executed by the computed function is optimized given the knowledge that it will be + used to read values of the given type. +
+
+ Extended Type:
+ FSharpValue
+
+ Contains operations associated with constructing and analyzing F# types such as records, unions and tuples +
++ Static member + | ++ Description + | +||
+
+
+
+
+
+
+
+ Full Usage:
+
+ FSharpType.GetExceptionFields(exceptionType, ?bindingFlags)
+ + + Parameters: +
Type
+ -
+ The exception type to read.
+
+ + + + ?bindingFlags + + : + BindingFlags
+ -
+ Optional binding flags.
+
+ + + + Returns: + PropertyInfo[]
+
+ An array containing the PropertyInfo of each field in the exception.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Reads all the fields from an F# exception declaration, in declaration order + + |
+
+ + ArgumentException + + | ++ Thrown if the given type is not an exception. + | +
+
+
+
+
+
+
+
+ FSharpType.GetRecordFields(recordType, ?bindingFlags)
+
+
+
+
+ FSharpType.GetRecordFields(recordType, ?bindingFlags)
+ Type
+ -
+ The input record type.
+
+ BindingFlags
+ -
+ Optional binding flags.
+
+ PropertyInfo[]
+
+ An array of descriptions of the properties of the record type.
+ + Assumes the given input is a record value. If not, ArgumentException is raised. +
+Type
+ + The input record type. +
+BindingFlags
+ + Optional binding flags. +
+PropertyInfo[]
+ + An array of descriptions of the properties of the record type. +
+
+
+
+
+
+
+
+
+ FSharpType.GetUnionCases(unionType, ?bindingFlags)
+
+
+
+
+ FSharpType.GetUnionCases(unionType, ?bindingFlags)
+ Type
+ -
+ The input union type.
+
+ BindingFlags
+ -
+ Optional binding flags.
+
+ UnionCaseInfo[]
+
+ An array of descriptions of the cases of the given union type.
+ + Assumes the given type is a union type. If not, ArgumentException is raised during pre-computation. +
+Type
+ + The input union type. +
+BindingFlags
+ + Optional binding flags. +
+UnionCaseInfo[]
+ + An array of descriptions of the cases of the given union type. +
++ + ArgumentException + + | ++ Thrown when the input type is not a union type. + | +
+
+
+
+ FSharpType.IsExceptionRepresentation(exceptionType, ?bindingFlags)
+
+
+
+
+ FSharpType.IsExceptionRepresentation(exceptionType, ?bindingFlags)
+ Type
+ -
+ The type to check.
+
+ BindingFlags
+ -
+ Optional binding flags.
+
+ bool
+
+ True if the type check is an F# exception.
+
+ Returns true if the typ
is a representation of an F# exception declaration
+
Type
+ + The type to check. +
+BindingFlags
+ + Optional binding flags. +
+bool
+ + True if the type check is an F# exception. +
+
+
+
+
+
+ Return true if the typ
is a representation of an F# function type or the runtime type of a closure implementing an F# function type
+
Type
+ + The type to check. +
+bool
+ + True if the type check succeeds. +
+
+
+
+
+
+
+
+ FSharpType.IsRecord(typ, ?bindingFlags)
+ Type
+ -
+ The type to check.
+
+ BindingFlags
+ -
+ Optional binding flags.
+
+ bool
+
+ True if the type check succeeds.
+ Type
+ + The type to check. +
+BindingFlags
+ + Optional binding flags. +
+bool
+ + True if the type check succeeds. +
+
+
+
+
+ FSharpType.IsTuple(typ)
+
+
+
+
+
+
+
+
+ FSharpType.IsUnion(typ, ?bindingFlags)
+ Type
+ -
+ The type to check.
+
+ BindingFlags
+ -
+ Optional binding flags.
+
+ bool
+
+ True if the type check succeeds.
+
+ Returns true if the typ
is a representation of an F# union type or the runtime type of a value of that type
+
Type
+ + The type to check. +
+BindingFlags
+ + Optional binding flags. +
+bool
+ + True if the type check succeeds. +
+
+
+
+
+
+
+
+
+
+
+ FSharpType.MakeStructTupleType(asm, types)
+ Assembly
+ -
+ Runtime assembly containing System.ValueTuple definitions.
+
+ Type[]
+ -
+ An array of types for the tuple elements.
+
+ Type
+
+ The type representing the struct tuple containing the input elements.
+ Assembly
+ + Runtime assembly containing System.ValueTuple definitions. +
+Type[]
+ + An array of types for the tuple elements. +
+Type
+ + The type representing the struct tuple containing the input elements. +
+
+
+
+ FSharpType.MakeTupleType(asm, types)
+ Assembly
+ -
+ Runtime assembly containing System.Tuple definitions.
+
+ Type[]
+ -
+ An array of types for the tuple elements.
+
+ Type
+
+ The type representing the tuple containing the input elements.
+
+
+
+
+ + Contains operations associated with constructing and analyzing values associated with F# types + such as records, unions and tuples. +
++ Static member + | ++ Description + | +||
+
+
+
+
+
+
+
+ Full Usage:
+
+ FSharpValue.GetExceptionFields(exn, ?bindingFlags)
+ + + Parameters: +
obj
+ -
+ The exception instance.
+
+ + + + ?bindingFlags + + : + BindingFlags
+ -
+ Optional binding flags.
+
+ + + + Returns: + obj[]
+
+ The fields from the given exception.
+ + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Reads all the fields from a value built using an instance of an F# exception declaration + + |
+
+ + ArgumentException + + | ++ Thrown when the input type is not an F# exception. + | +
+
+
+ FSharpValue.GetRecordField(record, info)
+ obj
+ -
+ The record object.
+
+ PropertyInfo
+ -
+ The PropertyInfo describing the field to read.
+
+ obj
+
+ The field from the record.
+ + Assumes the given input is a record value. If not, ArgumentException is raised. +
+obj
+ + The record object. +
+PropertyInfo
+ + The PropertyInfo describing the field to read. +
+obj
+ + The field from the record. +
++ + ArgumentException + + | ++ Thrown when the input is not a record value. + | +
+
+
+
+ FSharpValue.GetRecordFields(record, ?bindingFlags)
+
+
+
+
+ FSharpValue.GetRecordFields(record, ?bindingFlags)
+ obj
+ -
+ The record object.
+
+ BindingFlags
+ -
+ Optional binding flags for the record.
+
+ obj[]
+
+ The array of fields from the record.
+ + Assumes the given input is a record value. If not, ArgumentException is raised. +
+obj
+ + The record object. +
+BindingFlags
+ + Optional binding flags for the record. +
+obj[]
+ + The array of fields from the record. +
++ + ArgumentException + + | ++ Thrown when the input type is not a record type. + | +
+
+
+
+ + Assumes the given input is a tuple value. If not, ArgumentException is raised. +
+obj
+ + The input tuple. +
+int
+ + The index of the field to read. +
+obj
+ + The value of the field. +
+
+
+
+
+ + Assumes the given input is a tuple value. If not, ArgumentException is raised. +
+obj
+ + The input tuple. +
+obj[]
+ + An array of the fields from the given tuple. +
++ + ArgumentException + + | ++ Thrown when the input is not a tuple value. + | +
+
+
+
+ FSharpValue.GetUnionFields(value, unionType, ?bindingFlags)
+
+
+
+
+ FSharpValue.GetUnionFields(value, unionType, ?bindingFlags)
+ obj
+ -
+ The input union case.
+
+ Type
+ -
+ The union type containing the value.
+
+ BindingFlags
+ -
+ Optional binding flags.
+
+ UnionCaseInfo * obj[]
+
+ The description of the union case and its fields.
+ + Assumes the given input is a union case value. If not, ArgumentException is raised. + + If the type is not given, then the runtime type of the input object is used to identify the + relevant union type. The type should always be given if the input object may be null. For example, + option values may be represented using the 'null'. +
+obj
+ + The input union case. +
+Type
+ + The union type containing the value. +
+BindingFlags
+ + Optional binding flags. +
+UnionCaseInfo * obj[]
+ + The description of the union case and its fields. +
++ + ArgumentException + + | ++ Thrown when the input type is not a union case value. + | +
+
+
+
+ FSharpValue.MakeFunction(functionType, implementation)
+
+
+
+
+ FSharpValue.MakeFunction(functionType, implementation)
+ Type
+ -
+ The function type of the implementation.
+
+ obj -> obj
+ -
+ The untyped lambda of the function implementation.
+
+ obj
+
+ A typed function from the given dynamic implementation.
+ + Builds a typed function from object from a dynamic function implementation +
+Type
+ + The function type of the implementation. +
+obj -> obj
+ + The untyped lambda of the function implementation. +
+obj
+ + A typed function from the given dynamic implementation. +
+
+
+
+
+ FSharpValue.MakeRecord(recordType, values, ?bindingFlags)
+
+
+
+
+ FSharpValue.MakeRecord(recordType, values, ?bindingFlags)
+ Type
+ -
+ The type of record to make.
+
+ obj[]
+ -
+ The array of values to initialize the record.
+
+ BindingFlags
+ -
+ Optional binding flags for the record.
+
+ obj
+
+ The created record.
+ + Assumes the given input is a record type. +
+Type
+ + The type of record to make. +
+obj[]
+ + The array of values to initialize the record. +
+BindingFlags
+ + Optional binding flags for the record. +
+obj
+ + The created record. +
++ + ArgumentException + + | ++ Thrown when the input type is not a record type. + | +
+
+
+ FSharpValue.MakeTuple(tupleElements, tupleType)
+ obj[]
+ -
+ The array of tuple fields.
+
+ Type
+ -
+ The tuple type to create.
+
+ obj
+
+ An instance of the tuple type with the given elements.
+ + Assumes at least one element is given. If not, ArgumentException is raised. +
+obj[]
+ + The array of tuple fields. +
+Type
+ + The tuple type to create. +
+obj
+ + An instance of the tuple type with the given elements. +
++ + ArgumentException + + | ++ Thrown if no elements are given. + | +
+
+
+
+ FSharpValue.MakeUnion(unionCase, args, ?bindingFlags)
+
+
+
+
+ FSharpValue.MakeUnion(unionCase, args, ?bindingFlags)
+ UnionCaseInfo
+ -
+ The description of the union case to create.
+
+ obj[]
+ -
+ The array of arguments to construct the given case.
+
+ BindingFlags
+ -
+ Optional binding flags.
+
+ obj
+
+ The constructed union case.
+ UnionCaseInfo
+ + The description of the union case to create. +
+obj[]
+ + The array of arguments to construct the given case. +
+BindingFlags
+ + Optional binding flags. +
+obj
+ + The constructed union case. +
+
+
+
+
+ FSharpValue.PreComputeRecordConstructor(recordType, ?bindingFlags)
+
+
+
+
+ FSharpValue.PreComputeRecordConstructor(recordType, ?bindingFlags)
+ Type
+ -
+ The type of record to construct.
+
+ BindingFlags
+ -
+ Optional binding flags.
+
+ obj[] -> obj
+
+ A function to construct records of the given type.
+ + Assumes the given type is a RecordType. + If not, ArgumentException is raised during pre-computation. +
+Type
+ + The type of record to construct. +
+BindingFlags
+ + Optional binding flags. +
++ + ArgumentException + + | ++ Thrown when the input type is not a record type. + | +
+
+
+
+ FSharpValue.PreComputeRecordConstructorInfo(recordType, ?bindingFlags)
+
+
+
+
+ FSharpValue.PreComputeRecordConstructorInfo(recordType, ?bindingFlags)
+ Type
+ -
+ The record type.
+
+ BindingFlags
+ -
+ Optional binding flags.
+
+ ConstructorInfo
+
+ A ConstructorInfo for the given record type.
+ Type
+ + The record type. +
+BindingFlags
+ + Optional binding flags. +
+ConstructorInfo
+ + A ConstructorInfo for the given record type. +
+
+
+
+ FSharpValue.PreComputeRecordFieldReader(info)
+ PropertyInfo
+ -
+ The PropertyInfo of the field to read.
+
+ obj -> obj
+
+ A function to read the specified field from the record.
+ + Precompute a function for reading a particular field from a record. + Assumes the given type is a RecordType with a field of the given name. + If not, ArgumentException is raised during pre-computation. +
++ Using the computed function will typically be faster than executing a corresponding call to Value.GetInfo + because the path executed by the computed function is optimized given the knowledge that it will be + used to read values of the given type. +
+PropertyInfo
+ + The PropertyInfo of the field to read. +
++ + ArgumentException + + | ++ Thrown when the input type is not a record type. + | +
+
+
+
+ FSharpValue.PreComputeRecordReader(recordType, ?bindingFlags)
+
+
+
+
+ FSharpValue.PreComputeRecordReader(recordType, ?bindingFlags)
+ Type
+ -
+ The type of record to read.
+
+ BindingFlags
+ -
+ Optional binding flags.
+
+ obj -> obj[]
+
+ An optimized reader for the given record type.
+ + Precompute a function for reading all the fields from a record. The fields are returned in the + same order as the fields reported by a call to Microsoft.FSharp.Reflection.Type.GetInfo for + this type. +
++ Assumes the given type is a RecordType. + If not, ArgumentException is raised during pre-computation. + + Using the computed function will typically be faster than executing a corresponding call to Value.GetInfo + because the path executed by the computed function is optimized given the knowledge that it will be + used to read values of the given type. +
+Type
+ + The type of record to read. +
+BindingFlags
+ + Optional binding flags. +
++ + ArgumentException + + | ++ Thrown when the input type is not a record type. + | +
+
+
+
+ FSharpValue.PreComputeTupleConstructor(tupleType)
+
+
+
+
+
+ + Precompute a function for reading the values of a particular tuple type +
++ Assumes the given type is a TupleType. + If not, ArgumentException is raised during pre-computation. +
+Type
+ + The type of tuple to read. +
++ + ArgumentException + + | ++ Thrown when the given type is not a tuple type. + | +
+
+
+
+ FSharpValue.PreComputeTupleConstructorInfo(tupleType)
+
+
+
+
+ FSharpValue.PreComputeTupleConstructorInfo(tupleType)
+ Type
+ -
+ The input tuple type.
+
+ ConstructorInfo * Type option
+
+ The description of the tuple type constructor and an optional extra type
+ for large tuples.
+ + Gets a method that constructs objects of the given tuple type. + For small tuples, no additional type will be returned. +
++ For large tuples, an additional type is returned indicating that + a nested encoding has been used for the tuple type. In this case + the suffix portion of the tuple type has the given type and an + object of this type must be created and passed as the last argument + to the ConstructorInfo. A recursive call to PreComputeTupleConstructorInfo + can be used to determine the constructor for that the suffix type. +
+Type
+ + The input tuple type. +
+ConstructorInfo * Type option
+ + The description of the tuple type constructor and an optional extra type + for large tuples. +
+
+
+
+
+ FSharpValue.PreComputeTuplePropertyInfo(tupleType, index)
+
+
+
+
+ FSharpValue.PreComputeTuplePropertyInfo(tupleType, index)
+ Type
+ -
+ The input tuple type.
+
+ int
+ -
+ The index of the tuple element to describe.
+
+ PropertyInfo * (Type * int) option
+
+ The description of the tuple element and an optional type and index if the tuple is big.
+ Type
+ + The input tuple type. +
+int
+ + The index of the tuple element to describe. +
+PropertyInfo * (Type * int) option
+ + The description of the tuple element and an optional type and index if the tuple is big. +
+
+
+
+
+ + Precompute a function for reading the values of a particular tuple type +
++ Assumes the given type is a TupleType. + If not, ArgumentException is raised during pre-computation. +
+Type
+ + The tuple type to read. +
++ + ArgumentException + + | ++ Thrown when the given type is not a tuple type. + | +
+
+
+
+ FSharpValue.PreComputeUnionConstructor(unionCase, ?bindingFlags)
+
+
+
+
+ FSharpValue.PreComputeUnionConstructor(unionCase, ?bindingFlags)
+ UnionCaseInfo
+ -
+ The description of the union case.
+
+ BindingFlags
+ -
+ Optional binding flags.
+
+ obj[] -> obj
+
+ A function for constructing values of the given union case.
+ + Precompute a function for constructing a discriminated union value for a particular union case. +
+UnionCaseInfo
+ + The description of the union case. +
+BindingFlags
+ + Optional binding flags. +
+
+
+
+
+ FSharpValue.PreComputeUnionConstructorInfo(unionCase, ?bindingFlags)
+
+
+
+
+ FSharpValue.PreComputeUnionConstructorInfo(unionCase, ?bindingFlags)
+ UnionCaseInfo
+ -
+ The description of the union case.
+
+ BindingFlags
+ -
+ Optional binding flags.
+
+ MethodInfo
+
+ The description of the constructor of the given union case.
+ UnionCaseInfo
+ + The description of the union case. +
+BindingFlags
+ + Optional binding flags. +
+MethodInfo
+ + The description of the constructor of the given union case. +
+
+
+
+
+ FSharpValue.PreComputeUnionReader(unionCase, ?bindingFlags)
+
+
+
+
+ FSharpValue.PreComputeUnionReader(unionCase, ?bindingFlags)
+ UnionCaseInfo
+ -
+ The description of the union case to read.
+
+ BindingFlags
+ -
+ Optional binding flags.
+
+ obj -> obj[]
+
+ A function to for reading the fields of the given union case.
+ + Precompute a function for reading all the fields for a particular discriminator case of a union type +
++ Using the computed function will typically be faster than executing a corresponding call to GetFields +
+UnionCaseInfo
+ + The description of the union case to read. +
+BindingFlags
+ + Optional binding flags. +
+
+
+
+
+ FSharpValue.PreComputeUnionTagMemberInfo(unionType, ?bindingFlags)
+
+
+
+
+ FSharpValue.PreComputeUnionTagMemberInfo(unionType, ?bindingFlags)
+ Type
+ -
+ The type of union to read.
+
+ BindingFlags
+ -
+ Optional binding flags.
+
+ MemberInfo
+
+ The description of the union case reader.
+ + Precompute a property or static method for reading an integer representing the case tag of a union type. +
+Type
+ + The type of union to read. +
+BindingFlags
+ + Optional binding flags. +
+MemberInfo
+ + The description of the union case reader. +
+
+
+
+
+ FSharpValue.PreComputeUnionTagReader(unionType, ?bindingFlags)
+
+
+
+
+ FSharpValue.PreComputeUnionTagReader(unionType, ?bindingFlags)
+ Type
+ -
+ The type of union to optimize reading.
+
+ BindingFlags
+ -
+ Optional binding flags.
+
+ obj -> int
+
+ An optimized function to read the tags of the given union type.
+ + Assumes the given type is a union type. + If not, ArgumentException is raised during pre-computation. +
++ Using the computed function is more efficient than calling GetUnionCase + because the path executed by the computed function is optimized given the knowledge that it will be + used to read values of the given type. +
+Type
+ + The type of union to optimize reading. +
+BindingFlags
+ + Optional binding flags. +
++ Represents a case of a discriminated union type +
++ Instance member + | ++ Description + | +
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+type Weather =
+ | Rainy
+ | Sunny
+union case Weather.Rainy: Weather
+union case Weather.Sunny: Weather
+val rainy: obj
+val typeof<'T> : System.Type
+module Array
+
+from Microsoft.FSharp.Collections
+val head: array: 'T array -> 'T
+
+
+ Evaluates to a value of type System.Type
+ that holds type information for Weather .
+
+
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Returns the custom attributes associated with the case matching the given attribute type. + + |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetCustomAttributes
+ + + + Returns: + obj[]
+
+ An array of custom attributes.
+ + |
+
+
+
+ + ++
+ Example +++
+type Weather =
+ | Rainy
+ | Sunny
+union case Weather.Rainy: Weather
+union case Weather.Sunny: Weather
+val typeof<'T> : System.Type
+module Array
+
+from Microsoft.FSharp.Collections
+val map: mapping: ('T -> 'U) -> array: 'T array -> 'U array
+val x: obj
+
+
+ Evaluates to
+
+namespace Microsoft
+namespace Microsoft.FSharp
+namespace Microsoft.FSharp.Core
+Multiple items
+type CompilationMappingAttribute = + inherit Attribute + new: sourceConstructFlags: SourceConstructFlags -> CompilationMappingAttribute + 3 overloads + member ResourceName: string + member SequenceNumber: int + member SourceConstructFlags: SourceConstructFlags + member TypeDefinitions: Type array + member VariantNumber: int -------------------- new: sourceConstructFlags: SourceConstructFlags -> CompilationMappingAttribute new: sourceConstructFlags: SourceConstructFlags * sequenceNumber: int -> CompilationMappingAttribute new: resourceName: string * typeDefinitions: System.Type array -> CompilationMappingAttribute new: sourceConstructFlags: SourceConstructFlags * variantNumber: int * sequenceNumber: int -> CompilationMappingAttribute [<Struct>]
+type SourceConstructFlags =
+ | None = 0
+ | SumType = 1
+ | RecordType = 2
+ | ObjectType = 3
+ | Field = 4
+ | Exception = 5
+ | Closure = 6
+ | Module = 7
+ | UnionCase = 8
+ | Value = 9
+ | KindMask = 31
+ | NonPublicRepresentation = 32
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetCustomAttributesData
+ + + + Returns: + IList<CustomAttributeData>
+
+ An list of custom attribute data items.
+ + |
+
+
+
+ + ++
+ Example +++
+Multiple items
+type Signal = + inherit Attribute + new: signal: string -> Signal + member Signal: string -------------------- new: signal: string -> Signal val signal: string
+Multiple items
+val string: value: 'T -> string -------------------- type string = System.String namespace System
+Multiple items
+type Attribute = + member Equals: obj: obj -> bool + member GetHashCode: unit -> int + member IsDefaultAttribute: unit -> bool + member Match: obj: obj -> bool + static member GetCustomAttribute: element: Assembly * attributeType: Type -> Attribute + 7 overloads + static member GetCustomAttributes: element: Assembly -> Attribute array + 15 overloads + static member IsDefined: element: Assembly * attributeType: Type -> bool + 7 overloads + member TypeId: obj <summary>Represents the base class for custom attributes.</summary> -------------------- System.Attribute() : System.Attribute val this: Signal
+type Answer =
+ | Yes
+ | No
+union case Answer.Yes: Answer
+union case Answer.No: Answer
+val answerYes: obj
+val typeof<'T> : System.Type
+module Array
+
+from Microsoft.FSharp.Collections
+val find: predicate: ('T -> bool) -> array: 'T array -> 'T
+val x: obj
+
+
+ Evaluates to
+
+namespace System
+Multiple items
+type String = + interface IEnumerable<char> + interface IEnumerable + interface ICloneable + interface IComparable + interface IComparable<string> + interface IConvertible + interface IEquatable<string> + interface IParsable<string> + interface ISpanParsable<string> + new: value: nativeptr<char> -> unit + 8 overloads + ... <summary>Represents text as a sequence of UTF-16 code units.</summary> -------------------- System.String(value: nativeptr<char>) : System.String System.String(value: char array) : System.String System.String(value: System.ReadOnlySpan<char>) : System.String System.String(value: nativeptr<sbyte>) : System.String System.String(c: char, count: int) : System.String System.String(value: nativeptr<char>, startIndex: int, length: int) : System.String System.String(value: char array, startIndex: int, length: int) : System.String System.String(value: nativeptr<sbyte>, startIndex: int, length: int) : System.String System.String(value: nativeptr<sbyte>, startIndex: int, length: int, enc: System.Text.Encoding) : System.String Multiple items
+val seq: sequence: 'T seq -> 'T seq -------------------- type 'T seq = System.Collections.Generic.IEnumerable<'T> namespace Microsoft
+namespace Microsoft.FSharp
+namespace Microsoft.FSharp.Core
+Multiple items
+type CompilationMappingAttribute = + inherit Attribute + new: sourceConstructFlags: SourceConstructFlags -> CompilationMappingAttribute + 3 overloads + member ResourceName: string + member SequenceNumber: int + member SourceConstructFlags: SourceConstructFlags + member TypeDefinitions: Type array + member VariantNumber: int -------------------- new: sourceConstructFlags: SourceConstructFlags -> CompilationMappingAttribute new: sourceConstructFlags: SourceConstructFlags * sequenceNumber: int -> CompilationMappingAttribute new: resourceName: string * typeDefinitions: System.Type array -> CompilationMappingAttribute new: sourceConstructFlags: SourceConstructFlags * variantNumber: int * sequenceNumber: int -> CompilationMappingAttribute [<Struct>]
+type SourceConstructFlags =
+ | None = 0
+ | SumType = 1
+ | RecordType = 2
+ | ObjectType = 3
+ | Field = 4
+ | Exception = 5
+ | Closure = 6
+ | Module = 7
+ | UnionCase = 8
+ | Value = 9
+ | KindMask = 31
+ | NonPublicRepresentation = 32
+
+
+
+ |
+
+
+
+
+
+
+
+
+ Full Usage:
+
+ this.GetFields
+ + + + Returns: + PropertyInfo[]
+
+ The fields associated with the case.
+ + |
+
+
+
+ + ++
+ Example +++
+type Shape =
+ | Rectangle of width: float * length: float
+ | Circle of radius: float
+ | Prism of width: float * float * height: float
+union case Shape.Rectangle: width: float * length: float -> Shape
+Multiple items
+val float: value: 'T -> float (requires member op_Explicit) -------------------- type float = System.Double -------------------- type float<'Measure> = + float union case Shape.Circle: radius: float -> Shape
+union case Shape.Prism: width: float * float * height: float -> Shape
+val typeof<'T> : System.Type
+module Array
+
+from Microsoft.FSharp.Collections
+val map: mapping: ('T -> 'U) -> array: 'T array -> 'U array
+val unionCase: obj
+val fieldInfo: obj
+
+
+ Evaluates to
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+type Weather =
+ | Rainy
+ | Sunny
+union case Weather.Rainy: Weather
+union case Weather.Sunny: Weather
+val typeof<'T> : System.Type
+module Array
+
+from Microsoft.FSharp.Collections
+val map: mapping: ('T -> 'U) -> array: 'T array -> 'U array
+val x: obj
+
+
+ Evaluates to [|"Rainy", "Sunny"|]
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+ + ++
+ Example +++
+type CoinToss =
+ | Heads
+ | Tails
+union case CoinToss.Heads: CoinToss
+union case CoinToss.Tails: CoinToss
+val typeof<'T> : System.Type
+module Array
+
+from Microsoft.FSharp.Collections
+val map: mapping: ('T -> 'U) -> array: 'T array -> 'U array
+val x: obj
+
+
+ Evaluates to [|"Heads has tag 0"; "Tails has tag 1"|]
+
+ |
+
+ + Library functionality for accessing additional information about F# types and F# values at + runtime, augmenting that available through System.Reflection. + +
++ Type/Module + | ++ Description + | +
+ + | +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Defines further accessing additional information about F# types and F# values at runtime. + + |
+
+ + + + FSharpType + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Contains operations associated with constructing and analyzing F# types such as records, unions and tuples + + |
+
+ + + + FSharpValue + + + + |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + Contains operations associated with constructing and analyzing values associated with F# types + such as records, unions and tuples. + + |
+
+ + + + UnionCaseInfo + + + + |
+ + + | +
+ Namespace + | ++ Description + | +
+ + FSharp.Collections + + | ++ Operations for collections such as lists, arrays, sets, maps and sequences. See also + F# Collection Types in the F# Language Guide. + + | +
+ + FSharp.Control + + | ++ + Library functionality for asynchronous programming, events and agents. See also + Asynchronous Programming, + Events and + Lazy Expressions in the + F# Language Guide. + + | +
+ + FSharp.Control.TaskBuilderExtensions + + | ++ |
+ + FSharp.Core + + | ++ + Basic definitions of operators, options, functions, results, choices, attributes and plain text formatting. + + | +
+ + FSharp.Core.CompilerServices + + | ++ + Library functionality for supporting type providers and code generated by the F# compiler. See + also F# Type Providers in the F# Language Guide. + + | +
+ + FSharp.Linq + + | ++ + Library functionality for F# query syntax and interoperability with .NET LINQ Expressions. See + also F# Query Expressions in the F# Language Guide. + + | +
+ + FSharp.Linq.RuntimeHelpers + + | ++ + Library functionality associated with converting F# quotations to .NET LINQ expression trees. + + | +
+ + FSharp.NativeInterop + + | ++ + Library functionality for native interopability. See + also F# External Functions in + the F# Language Guide. + + | +
+ + FSharp.Quotations + + | ++ + Library functionality for F# quotations. + See also F# Code Quotations in the F# Language Guide. + + | +
+ + FSharp.Reflection + + | ++ + Library functionality for accessing additional information about F# types and F# values at + runtime, augmenting that available through System.Reflection. + + | +