A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://fsharp.github.io/fsharp-core-docs/reference/fsharp-collections-fsharpset-1.html below:

Set<'T> (FSharp.Core) | FSharp.Core

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.

value : 'T

The value to add to the set.

Returns: Set<'T>

The result set.

 let set = Set.empty.Add(1).Add(1).Add(2)
 printfn $"The new set is: {set}"

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

The sample evaluates to the following output: The new set is: set [1; 2]

A useful shortcut for Set.contains. See the Set module for further operations on sets.

value : 'T

The value to check.

Returns: bool

True if the set contains value.

 let set = Set.empty.Add(2).Add(3)
 printfn $"Does the set contain 1? {set.Contains(1)}"

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

The number of elements in the set

Returns: int
 let set = Set.empty.Add(1).Add(1).Add(2)
 printfn $"The set has {set.Count} elements"

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.

Returns: bool
 let set = Set.empty.Add(2).Add(3)
 printfn $"Is the set empty? {set.IsEmpty}"

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.

otherSet : Set<'T>

The set to test against.

Returns: bool

True if this set is a proper subset of otherSet.

 let set1 = Set.empty.Add(1).Add(2).Add(3)
 let set2 = Set.empty.Add(1).Add(2).Add(3).Add(4)
 printfn $"Is {set1} a proper superset of {set2}? {Set.isProperSuperset set1 set2}"

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: Is set [1; 2; 3] a proper subset of set [1; 2; 3; 4]? true

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.

otherSet : Set<'T>

The set to test against.

Returns: bool

True if this set is a proper superset of otherSet.

 let set1 = Set.empty.Add(1).Add(2).Add(3)
 let set2 = Set.empty.Add(1).Add(2).Add(3).Add(4)
 printfn $"Is {set1} a proper superset of {set2}? {Set.isProperSuperset set1 set2}"

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: Is set [1; 2; 3] a proper superset of set [1; 2; 3; 4]? false

Evaluates to "true" if all elements of the first set are in the second.

otherSet : Set<'T>

The set to test against.

Returns: bool

True if this set is a subset of otherSet.

 let set1 = Set.empty.Add(1).Add(2).Add(3)
 let set2 = Set.empty.Add(1).Add(2).Add(3).Add(4)
 printfn $"Is {set1} a subset of {set2}? {Set.isSubset set1 set2}"

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: Is set [1; 2; 3] a subset of set [1; 2; 3; 4]? true

Evaluates to "true" if all elements of the second set are in the first.

otherSet : Set<'T>

The set to test against.

Returns: bool

True if this set is a superset of otherSet.

 let set1 = Set.empty.Add(1).Add(2).Add(3)
 let set2 = Set.empty.Add(1).Add(2).Add(3).Add(4)
 printfn $"Is {set1} a superset of {set2}? {Set.isSuperset set1 set2}"

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: Is set [1; 2; 3] a superset of set [1; 2; 3; 4]? false

Returns the highest element in the set according to the ordering being used for the set.

Returns: 'T
 let set = Set.empty.Add(1).Add(2).Add(3)
 printfn $"MaximumElement: {set.MaximumElement}"

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.MaximumElement: int with get

The sample evaluates to the following output: MaximumElement: 3

Returns the lowest element in the set according to the ordering being used for the set.

Returns: 'T
 let set = Set.empty.Add(1).Add(2).Add(3)
 printfn $"MinimumElement: {set.MinimumElement}"

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.MinimumElement: int with get

The sample evaluates to the following output: MinimumElement: 1

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.

value : 'T

The value to remove from the set.

Returns: Set<'T>

The result set.

 let set = Set.empty.Add(1).Add(1).Add(2)
 printfn $"The new set is: {set}"

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

The sample evaluates to the following output: The new set is: set [2]

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4