Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Cleanup of "array" docs #67

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,20 @@ Gets a read-only collection of the **Exception** instances that caused the curre

**Assembly**: FSharp.Core (in FSharp.Core.dll)


## Syntax



```fsharp

// Signature:
member this.InnerExceptions : ReadOnlyCollection<exn>

// Usage:
aggregateException.InnerExceptions


```




**A T:System.Collections.ObjectModel.ReadOnlyCollection&#96;1 that contains the inner exceptions.**
**A System.Collections.ObjectModel.ReadOnlyCollection&lt;Exception&gt; that contains the inner exceptions.**
## Remarks
This API is provided for use only with the F# Core Library Versions that targets .NET Framework 2.0. If you are using .NET Framework 4, use the .NET Framework 4 API with the same name, **P:System.AggregateException.InnerExceptions**.
This API is provided for use only with the F# Core Library Versions that targets .NET Framework 2.0. If you are using .NET Framework 4, use the .NET Framework 4 API with the same name, **System.AggregateException.InnerExceptions**.


## Platforms
Expand All @@ -52,8 +44,6 @@ Windows 8, Windows 7, Windows Server 2012, Windows Server 2008 R2
Supported in: 2.0




## See Also
[System.AggregateException Class &#40;F&#35;&#41;](System.AggregateException-Class-%5BFSharp%5D.md)

Expand Down
9 changes: 3 additions & 6 deletions docs/conceptual/arithmetic-operators-[fsharp].md
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,15 @@ ms.assetid: 75ddcfa3-564e-4382-80a3-f9da73d0f0ea

This topic describes arithmetic operators that are available in the F# language.


## Summary of Binary Arithmetic Operators
The following table summarizes the binary arithmetic operators that are available for unboxed integral and floating-point types.



|Binary operator|Notes|
|---------------|-----|
|**+** (addition, plus)|Unchecked. Possible overflow condition when numbers are added together and the sum exceeds the maximum absolute value supported by the type.|
|**-** (subtraction, minus)|Unchecked. Possible underflow condition when unsigned types are subtracted, or when floating-point values are too small to be represented by the type.|
|**&#42;** (multiplication, times)|Unchecked. Possible overflow condition when numbers are multiplied and the product exceeds the maximum absolute value supported by the type.|
|**/** (division, divided by)|Division by zero causes a **T:System.DivideByZeroException** for integral types. For floating-point types, division by zero gives you the special floating-point values **+Infinity** or **-Infinity**. There is also a possible underflow condition when a floating-point number is too small to be represented by the type.|
|**/** (division, divided by)|Division by zero causes a **System.DivideByZeroException** for integral types. For floating-point types, division by zero gives you the special floating-point values **+Infinity** or **-Infinity**. There is also a possible underflow condition when a floating-point number is too small to be represented by the type.|
|**%** (modulus, mod)|Returns the remainder of a division operation. The sign of the result is the same as the sign of the first operand.|
|**&#42;&#42;** (exponentiation, to the power of)|Possible overflow condition when the result exceeds the maximum absolute value for the type.<br /><br />The exponentiation operator works only with floating-point types.|

Expand Down Expand Up @@ -58,9 +55,9 @@ Floating-point numbers should never be directly compared for equality, because t
|**&lt;&gt;** (not equal)|This is a generic operator.|

## Overloaded and Generic Operators
All of the operators discussed in this topic are defined in the **Microsoft.FSharp.Core.Operators** namespace. Some of the operators are defined by using statically resolved type parameters. This means that there are individual definitions for each specific type that works with that operator. All of the unary and binary arithmetic and bitwise operators are in this category. The comparison operators are generic and therefore work with any type, not just primitive arithmetic types. Discriminated union and record types have their own custom implementations that are generated by the F# compiler. Class types use the method **M:System.Object.Equals(System.Object)**.
All of the operators discussed in this topic are defined in the **Microsoft.FSharp.Core.Operators** namespace. Some of the operators are defined by using statically resolved type parameters. This means that there are individual definitions for each specific type that works with that operator. All of the unary and binary arithmetic and bitwise operators are in this category. The comparison operators are generic and therefore work with any type, not just primitive arithmetic types. Discriminated union and record types have their own custom implementations that are generated by the F# compiler. Class types use the method **System.Object.Equals(System.Object)**.

The generic operators are customizable. To customize the comparison functions, override **M:System.Object.Equals(System.Object)** to provide your own custom equality comparison, and then implement **T:System.IComparable**. The **T:System.IComparable** interface has a single method, the **M:System.IComparable.CompareTo(System.Object)** method.
The generic operators are customizable. To customize the comparison functions, override **System.Object.Equals(System.Object)** to provide your own custom equality comparison, and then implement **System.IComparable**. The **System.IComparable** interface has a single method, the **System.IComparable.CompareTo(System.Object)** method.


## Operators and Type Inference
Expand Down
15 changes: 1 addition & 14 deletions docs/conceptual/array.exists2['t1,'t2]-function-[fsharp].md
Original file line number Diff line number Diff line change
Expand Up @@ -18,52 +18,39 @@ Tests if any pair of corresponding elements of the arrays satisfies the given pr

**Assembly:** FSharp.Core (in FSharp.Core.dll)


## Syntax



```fsharp

// Signature:
Array.exists2 : ('T1 -> 'T2 -> bool) -> 'T1 [] -> 'T2 [] -> bool

// Usage:
Array.exists2 predicate array1 array2


```



#### Parameters
*predicate*
Type: **'T1 -&gt; 'T2 -&gt;**[bool](http://msdn.microsoft.com/en-us/library/89c0cf9c-49ce-4207-a3be-555851a67dd5)


The function to test the input elements.


*array1*
Type: **'T1**[[]](http://msdn.microsoft.com/en-us/library/def20292-9aae-4596-9275-b94e594f8493)


The first input array.


*array2*
Type: **'T2**[[]](http://msdn.microsoft.com/en-us/library/def20292-9aae-4596-9275-b94e594f8493)


The second input array.


## Return value

**true** if any result from predicate is true. Otherwise, **false**.

## Remarks
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 collection is longer than the other then the **T:System.ArgumentException** exception is raised. Otherwise, **false** is returned.
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 collection is longer than the other then the **System.ArgumentException** exception is raised. Otherwise, **false** is returned.

This function is named **Exists2** in compiled assemblies. If you are accessing the member from a language other than F#, or through reflection, use this name.

Expand Down
14 changes: 1 addition & 13 deletions docs/conceptual/array.find['t]-function-[fsharp].md
Original file line number Diff line number Diff line change
Expand Up @@ -12,41 +12,32 @@ ms.assetid: 7c9c2263-06e6-4a3f-b080-20bf3cf4ebd9

# Array.find<'T> Function (F#)

Returns the first element for which the given function returns **true**. Raise **T:System.Collections.Generic.KeyNotFoundException** if no such element exists.
Returns the first element for which the given function returns **true**. Raise **System.Collections.Generic.KeyNotFoundException** if no such element exists.

**Namespace/Module Path:** Microsoft.FSharp.Collections.Array

**Assembly:** FSharp.Core (in FSharp.Core.dll)


## Syntax



```fsharp

// Signature:
Array.find : ('T -> bool) -> 'T [] -> 'T

// Usage:
Array.find predicate array


```


#### Parameters
*predicate*
Type: **'T -&gt;**[bool](http://msdn.microsoft.com/library/89c0cf9c-49ce-4207-a3be-555851a67dd5)


The function to test the input elements.


*array*
Type: **'T**[[]](http://msdn.microsoft.com/library/def20292-9aae-4596-9275-b94e594f8493)


The input array.

## Exceptions
Expand Down Expand Up @@ -76,9 +67,6 @@ Windows 8, Windows 7, Windows Server 2012, Windows Server 2008 R2

Supported in: 2.0, 4.0, Portable




## See Also
[Collections.Array Module &#40;F&#35;&#41;](Collections.Array-Module-%5BFSharp%5D.md)

Expand Down
20 changes: 1 addition & 19 deletions docs/conceptual/array.findindex['t]-function-[fsharp].md
Original file line number Diff line number Diff line change
Expand Up @@ -12,52 +12,34 @@ ms.assetid: 32c37f7f-32f4-47fd-95c7-78e8a85045ed

# Array.findIndex<'T> Function (F#)

Returns the index of the first element in the array that satisfies the given predicate. Raise **T:System.Collections.Generic.KeyNotFoundException** if none of the elements satisfy the predicate.
Returns the index of the first element in the array that satisfies the given predicate. Raise **System.Collections.Generic.KeyNotFoundException** if none of the elements satisfy the predicate.

**Namespace/Module Path**: Microsoft.FSharp.Collections.Array

**Assembly**: FSharp.Core (in FSharp.Core.dll)


## Syntax



```




// Signature:
Array.findIndex : ('T -> bool) -> 'T [] -> int

// Usage:
Array.findIndex predicate array


```





#### Parameters
*predicate*
Type: **'T -&gt;**[bool](http://msdn.microsoft.com/en-us/library/89c0cf9c-49ce-4207-a3be-555851a67dd5)


The function to test the input elements.


*array*
Type: **'T**[[]](http://msdn.microsoft.com/en-us/library/def20292-9aae-4596-9275-b94e594f8493)


The input array.



**exceptions tag is not supported!!!!**
**The index of the first element in the array that satisfies the given predicate.**
## Remarks
This function is named **FindIndex** in compiled assemblies. If you are accessing the function from a language other than F#, or through reflection, use this name.
Expand Down
29 changes: 1 addition & 28 deletions docs/conceptual/array.fold2['t1,'t2,'state]-function-[fsharp].md
Original file line number Diff line number Diff line change
Expand Up @@ -12,66 +12,43 @@ ms.assetid: 493ad9c8-9c14-45b4-9689-03ad9b9639b5

# Array.fold2<'T1,'T2,'State> Function (F#)

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 **T:System.ArgumentException** is raised.
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 **System.ArgumentException** is raised.

**Namespace/Module Path:** Microsoft.FSharp.Collections.Array

**Assembly:** FSharp.Core (in FSharp.Core.dll)


## Syntax



```




// Signature:
Array.fold2 : ('State -> 'T1 -> 'T2 -> 'State) -> 'State -> 'T1 [] -> 'T2 [] -> 'State

// Usage:
Array.fold2 folder state array1 array2


```





#### Parameters
*folder*
Type: **'State -&gt; 'T1 -&gt; 'T2 -&gt; 'State**


The function to update the state given the input elements.


*state*
Type: **'State**


The initial state.


*array1*
Type: **'T1**[[]](http://msdn.microsoft.com/en-us/library/def20292-9aae-4596-9275-b94e594f8493)


The first input array.


*array2*
Type: **'T2**[[]](http://msdn.microsoft.com/en-us/library/def20292-9aae-4596-9275-b94e594f8493)


The second input array.



**exceptions tag is not supported!!!!**
**The final state.**
## Remarks
This function is named **Fold2** in compiled assemblies. If you are accessing the function from a language other than F#, or through reflection, use this name.
Expand All @@ -83,15 +60,11 @@ This function is named **Fold2** in compiled assemblies. If you are accessing th
## Platforms
Windows 8, Windows 7, Windows Server 2012, Windows Server 2008 R2


## Version Information
**F# Core Library Versions**

Supported in: 2.0, 4.0, Portable




## See Also
[Collections.Array Module &#40;F&#35;&#41;](Collections.Array-Module-%5BFSharp%5D.md)

Expand Down
Loading