Skip to content
Merged
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
6 changes: 3 additions & 3 deletions docs/fsharp/get-started/get-started-vscode.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Next, open the command palette (**View > Command Palette**) and type the followi
This is powered by the [FORGE](https://github.com/fsharp-editing/Forge) project.

> [!NOTE]
If you don't see template options, try refreshing templates by running the following command in the Command Palette: `>F#: Refresh Project Templates`.
> If you don't see template options, try refreshing templates by running the following command in the Command Palette: `>F#: Refresh Project Templates`.

Select "F#: New Project" by hitting **Enter**. This takes you to the next step, which is for selecting a project template.

Expand Down Expand Up @@ -91,8 +91,8 @@ val it : string = "appleyay"

The function appears to be working as expected. Congratulations, you just wrote your first F# function in Visual Studio Code and evaluated it with FSI!

>[!NOTE]
As you may have noticed, the lines in FSI are terminated with `;;`. This is because FSI allows you to enter multiple lines. The `;;` at the end lets FSI know when the code is finished.
> [!NOTE]
> As you may have noticed, the lines in FSI are terminated with `;;`. This is because FSI allows you to enter multiple lines. The `;;` at the end lets FSI know when the code is finished.

## Explaining the code

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,15 @@ The following example uses the first-class status of functions in F# to declare

[!code-fsharp[Main](../../../samples/snippets/fsharp/contour/snippet34.fs)]

>[!NOTE]
For an even shorter version, see the following section, "Curried Functions."
> [!NOTE]
> For an even shorter version, see the following section, "Curried Functions."

The following code sends two functions as arguments to `compose`, both of which take a single argument of the same type. The return value is a new function that is a composition of the two function arguments.

[!code-fsharp[Main](../../../samples/snippets/fsharp/contour/snippet35.fs)]

>[!NOTE]
F# provides two operators, `<<` and `>>`, that compose functions. For example, `let squareAndDouble2 = doubleIt << squareIt` is equivalent to `let squareAndDouble = compose doubleIt squareIt` in the previous example.
> [!NOTE]
> F# provides two operators, `<<` and `>>`, that compose functions. For example, `let squareAndDouble2 = doubleIt << squareIt` is equivalent to `let squareAndDouble = compose doubleIt squareIt` in the previous example.

The following example of returning a function as the value of a function call creates a simple guessing game. To create a game, call `makeGame` with the value that you want someone to guess sent in for `target`. The return value from function `makeGame` is a function that takes one argument (the guess) and reports whether the guess is correct.

Expand Down Expand Up @@ -133,8 +133,8 @@ To verify that the function still works as it did before, try the original test

[!code-fsharp[Main](../../../samples/snippets/fsharp/contour/snippet41.fs)]

>[!NOTE]
You can restrict currying by enclosing parameters in tuples. For more information, see "Parameter Patterns" in [Parameters and Arguments](../language-reference/parameters-and-arguments.md).
> [!NOTE]
> You can restrict currying by enclosing parameters in tuples. For more information, see "Parameter Patterns" in [Parameters and Arguments](../language-reference/parameters-and-arguments.md).

The following example uses implicit currying to write a shorter version of `makeGame`. The details of how `makeGame` constructs and returns the `game` function are less explicit in this format, but you can verify by using the original test cases that the result is the same.

Expand Down
4 changes: 2 additions & 2 deletions docs/fsharp/language-reference/access-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ In F#, the access control specifiers `public`, `internal`, and `private` can be

- `private` indicates that the entity can be accessed only from the enclosing type or module.

>[!NOTE]
The access specifier `protected` is not used in F#, although it is acceptable if you are using types authored in languages that do support `protected` access. Therefore, if you override a protected method, your method remains accessible only within the class and its descendents.
> [!NOTE]
> The access specifier `protected` is not used in F#, although it is acceptable if you are using types authored in languages that do support `protected` access. Therefore, if you override a protected method, your method remains accessible only within the class and its descendents.

In general, the specifier is put in front of the name of the entity, except when a `mutable` or `inline` specifier is used, which appear after the access control specifier.

Expand Down
2 changes: 1 addition & 1 deletion docs/fsharp/language-reference/arrays.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ms.date: 05/16/2016
# Arrays

> [!NOTE]
The API reference link will take you to MSDN. The docs.microsoft.com API reference is not complete.
> The API reference link will take you to MSDN. The docs.microsoft.com API reference is not complete.

Arrays are fixed-size, zero-based, mutable collections of consecutive data elements that are all of the same type.

Expand Down
4 changes: 2 additions & 2 deletions docs/fsharp/language-reference/assertions.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ Assertion checking is enabled only when you compile in Debug mode; that is, if t

The assertion failure error cannot be caught by using F# exception handling.

>[!NOTE]
The `assert` function resolves to <xref:System.Diagnostics.Debug.Assert*?displayProperty=nameWithType>.
> [!NOTE]
> The `assert` function resolves to <xref:System.Diagnostics.Debug.Assert*?displayProperty=nameWithType>.

## Example

Expand Down
2 changes: 1 addition & 1 deletion docs/fsharp/language-reference/asynchronous-workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ms.date: 05/16/2016
# Asynchronous Workflows

> [!NOTE]
The API reference link will take you to MSDN. The docs.microsoft.com API reference is not complete.
> The API reference link will take you to MSDN. The docs.microsoft.com API reference is not complete.

This topic describes support in F# for performing computations asynchronously, that is, without blocking execution of other work. For example, asynchronous computations can be used to write applications that have UIs that remain responsive to users as the application performs other work.

Expand Down
4 changes: 2 additions & 2 deletions docs/fsharp/language-reference/basic-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ This topic lists the basic types that are defined in the F# language. These type
|`float32`, `single`|<xref:System.Single>|A 32-bit floating point type.|
|`float`, `double`|<xref:System.Double>|A 64-bit floating point type.|

>[!NOTE]
You can perform computations with integers too big for the 64-bit integer type by using the [bigint](https://msdn.microsoft.com/library/dc8be18d-4042-46c4-b136-2f21a84f6efa) type. `bigint` is not considered a basic type; it is an abbreviation for `System.Numerics.BigInteger`.
> [!NOTE]
> You can perform computations with integers too big for the 64-bit integer type by using the [bigint](https://msdn.microsoft.com/library/dc8be18d-4042-46c4-b136-2f21a84f6efa) type. `bigint` is not considered a basic type; it is an abbreviation for `System.Numerics.BigInteger`.

## See also

Expand Down
2 changes: 1 addition & 1 deletion docs/fsharp/language-reference/code-quotations.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ms.date: 05/16/2016
# Code Quotations

> [!NOTE]
The API reference link will take you to MSDN. The docs.microsoft.com API reference is not complete.
> The API reference link will take you to MSDN. The docs.microsoft.com API reference is not complete.

This topic describes *code quotations*, a language feature that enables you to generate and work with F# code expressions programmatically. This feature lets you generate an abstract syntax tree that represents F# code. The abstract syntax tree can then be traversed and processed according to the needs of your application. For example, you can use the tree to generate F# code or generate code in some other language.

Expand Down
4 changes: 2 additions & 2 deletions docs/fsharp/language-reference/compiler-directives.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ The effect of disabling a warning applies to the entire file, including portions

Code that is deactivated by one of these directives appears dimmed in the Visual Studio Code Editor.

>[!NOTE]
The behavior of the conditional compilation directives is not the same as it is in other languages. For example, you cannot use Boolean expressions involving symbols, and `true` and `false` have no special meaning. Symbols that you use in the `if` directive must be defined by the command line or in the project settings; there is no `define` preprocessor directive.
> [!NOTE]
> The behavior of the conditional compilation directives is not the same as it is in other languages. For example, you cannot use Boolean expressions involving symbols, and `true` and `false` have no special meaning. Symbols that you use in the `if` directive must be defined by the command line or in the project settings; there is no `define` preprocessor directive.

The following code illustrates the use of the `#if`, `#else`, and `#endif` directives. In this example, the code contains two versions of the definition of `function1`. When `VERSION1` is defined by using the [-define compiler option](https://msdn.microsoft.com/library/434394ae-0d4a-459c-a684-bffede519a04), the code between the `#if` directive and the `#else` directive is activated. Otherwise, the code between `#else` and `#endif` is activated.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ The following code examples illustrate the use of the various exception handler

[!code-fsharp[Main](../../../../samples/snippets/fsharp/lang-ref-2/snippet5602.fs)]

>[!NOTE]
The `try...with` construct is a separate expression from the `try...finally` expression. Therefore, if your code requires both a `with` block and a `finally` block, you will have to nest the two expressions.
> [!NOTE]
> The `try...with` construct is a separate expression from the `try...finally` expression. Therefore, if your code requires both a `with` block and a `finally` block, you will have to nest the two expressions.

>[!NOTE]
You can use `try...with` in asynchronous workflows and other computation expressions, in which case a customized version of the `try...with` expression is used. For more information, see [Asynchronous Workflows](../asynchronous-workflows.md), and [Computation Expressions](../computation-expressions.md).
> [!NOTE]
> You can use `try...with` in asynchronous workflows and other computation expressions, in which case a customized version of the `try...with` expression is used. For more information, see [Asynchronous Workflows](../asynchronous-workflows.md), and [Computation Expressions](../computation-expressions.md).

## See also

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ms.date: 05/16/2016
# F# Interactive Options

> [!NOTE]
This article currently describes the experience for Windows only. It will be rewritten.
> This article currently describes the experience for Windows only. It will be rewritten.

This topic describes the command-line options supported by F# Interactive, `fsi.exe`. F# Interactive accepts many of the same command line options as the F# compiler, but also accepts some additional options.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ The following code illustrates a recursive function that computes the *n*<sup>th

[!code-fsharp[Main](../../../../samples/snippets/fsharp/lang-ref-1/snippet4001.fs)]

>[!NOTE]
In practice, code like that above is wasteful of memory and processor time because it involves the recomputation of previously computed values.
> [!NOTE]
> In practice, code like that above is wasteful of memory and processor time because it involves the recomputation of previously computed values.

Methods are implicitly recursive within the type; there is no need to add the `rec` keyword. Let bindings within classes are not implicitly recursive.

Expand Down
4 changes: 2 additions & 2 deletions docs/fsharp/language-reference/generics/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ The following code shows the use of the functions that are defined in the previo

[!code-fsharp[Main](../../../../samples/snippets/fsharp/lang-ref-1/snippet1702.fs)]

>[!NOTE]
There are two ways to refer to a generic type by name. For example, `list<int>` and `int list` are two ways to refer to a generic type `list` that has a single type argument `int`. The latter form is conventionally used only with built-in F# types such as `list` and `option`. If there are multiple type arguments, you normally use the syntax `Dictionary<int, string>` but you can also use the syntax `(int, string) Dictionary`.
> [!NOTE]
> There are two ways to refer to a generic type by name. For example, `list<int>` and `int list` are two ways to refer to a generic type `list` that has a single type argument `int`. The latter form is conventionally used only with built-in F# types such as `list` and `option`. If there are multiple type arguments, you normally use the syntax `Dictionary<int, string>` but you can also use the syntax `(int, string) Dictionary`.

## Wildcards as Type Arguments

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ms.date: 05/16/2016
# Import Declarations: The `open` Keyword

> [!NOTE]
The API reference links in this article will take you to MSDN. The docs.microsoft.com API reference is not complete.
> The API reference links in this article will take you to MSDN. The docs.microsoft.com API reference is not complete.

An *import declaration* specifies a module or namespace whose elements you can reference without using a fully qualified name.

Expand Down
2 changes: 1 addition & 1 deletion docs/fsharp/language-reference/lists.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ms.date: 05/16/2016
# Lists

> [!NOTE]
The API reference links in this article will take you to MSDN. The docs.microsoft.com API reference is not complete.
> The API reference links in this article will take you to MSDN. The docs.microsoft.com API reference is not complete.

A list in F# is an ordered, immutable series of elements of the same type. To perform basic operations on lists, use the functions in the [List module](https://msdn.microsoft.com/library/a2264ba3-2d45-40dd-9040-4f7aa2ad9788).

Expand Down
2 changes: 1 addition & 1 deletion docs/fsharp/language-reference/literals.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ms.date: 05/16/2016
# Literals

> [!NOTE]
The API reference links in this article will take you to MSDN (for now).
> The API reference links in this article will take you to MSDN (for now).

This topic provides a table that shows how to specify the type of a literal in F#.

Expand Down
4 changes: 2 additions & 2 deletions docs/fsharp/language-reference/loops-while-do-expression.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ The output of the previous code is a stream of random numbers between 1 and 20,
Found a 10!
```

>[!NOTE]
You can use `while...do` in sequence expressions and other computation expressions, in which case a customized version of the `while...do` expression is used. For more information, see [Sequences](sequences.md), [Asynchronous Workflows](asynchronous-workflows.md), and [Computation Expressions](computation-expressions.md).
> [!NOTE]
> You can use `while...do` in sequence expressions and other computation expressions, in which case a customized version of the `while...do` expression is used. For more information, see [Sequences](sequences.md), [Asynchronous Workflows](asynchronous-workflows.md), and [Computation Expressions](computation-expressions.md).

## See also

Expand Down
2 changes: 1 addition & 1 deletion docs/fsharp/language-reference/members/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ms.date: 05/16/2016
# Events

> [!NOTE]
The API reference links in this article will take you to MSDN. The docs.microsoft.com API reference is not complete.
> The API reference links in this article will take you to MSDN. The docs.microsoft.com API reference is not complete.

Events enable you to associate function calls with user actions and are important in GUI programming. Events can also be triggered by your applications or by the operating system.

Expand Down
2 changes: 1 addition & 1 deletion docs/fsharp/language-reference/query-expressions.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ms.date: 05/16/2016
# Query Expressions

> [!NOTE]
The API reference links in this article will take you to MSDN. The docs.microsoft.com API reference is not complete.
> The API reference links in this article will take you to MSDN. The docs.microsoft.com API reference is not complete.

Query expressions enable you to query a data source and put the data in a desired form. Query expressions provide support for LINQ in F#.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ The following example shows how to close a file automatically by using the `use`

[!code-fsharp[Main](../../../samples/snippets/fsharp/lang-ref-2/snippet6301.fs)]

>[!NOTE]
You can use `use` in computation expressions, in which case a customized version of the `use` expression is used. For more information, see [Sequences](sequences.md), [Asynchronous Workflows](asynchronous-workflows.md), and [Computation Expressions](computation-expressions.md).
> [!NOTE]
> You can use `use` in computation expressions, in which case a customized version of the `use` expression is used. For more information, see [Sequences](sequences.md), [Asynchronous Workflows](asynchronous-workflows.md), and [Computation Expressions](computation-expressions.md).

## using Function

Expand Down
2 changes: 1 addition & 1 deletion docs/fsharp/language-reference/sequences.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ms.date: 05/16/2016
# Sequences

> [!NOTE]
The API reference links in this article will take you to MSDN. The docs.microsoft.com API reference is not complete.
> The API reference links in this article will take you to MSDN. The docs.microsoft.com API reference is not complete.

A *sequence* is a logical series of elements all of one type. Sequences are particularly useful when you have a large, ordered collection of data but do not necessarily expect to use all of the elements. Individual sequence elements are computed only as required, so a sequence can provide better performance than a list in situations in which not all the elements are used. Sequences are represented by the `seq<'T>` type, which is an alias for `System.Collections.Generic.IEnumerable`. Therefore, any .NET Framework type that implements `System.IEnumerable` can be used as a sequence. The [Seq module](https://msdn.microsoft.com/library/54e8f059-ca52-4632-9ae9-49685ee9b684) provides support for manipulations involving sequences.

Expand Down
2 changes: 1 addition & 1 deletion docs/fsharp/language-reference/strings.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ms.date: 05/16/2016
# Strings

> [!NOTE]
The API reference links in this article will take you to MSDN. The docs.microsoft.com API reference is not complete.
> The API reference links in this article will take you to MSDN. The docs.microsoft.com API reference is not complete.

The `string` type represents immutable text as a sequence of Unicode characters. `string` is an alias for `System.String` in the .NET Framework.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ms.date: 04/04/2018
# Symbol and Operator Reference

> [!NOTE]
The API reference links in this article will take you to MSDN. The docs.microsoft.com API reference is not complete.
> The API reference links in this article will take you to MSDN. The docs.microsoft.com API reference is not complete.

This topic includes a table of symbols and operators that are used in the F# language.

Expand Down
4 changes: 2 additions & 2 deletions docs/fsharp/tour.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ Lists, Arrays, and Sequences are three primary collection types in the F# core l

Processing collections or sequences of elements is typically done with [recursion](language-reference/functions/index.md#recursive-functions) in F#. Although F# has support for loops and imperative programming, recursion is preferred because it is easier to guarantee correctness.

>[!NOTE]
The following example makes use of the pattern matching via the `match` expression. This fundamental construct is covered later in this article.
> [!NOTE]
> The following example makes use of the pattern matching via the `match` expression. This fundamental construct is covered later in this article.

[!code-fsharp[RecursiveFunctions](../../samples/snippets/fsharp/tour.fs#L461-L500)]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ redirect_url: /dotnet/fsharp/tutorials/asynchronous-and-concurrent-programming/a
# Asynchronous and Concurrent Programming in F# #

> [!NOTE]
This is still in-progress.
> This is still in-progress.
4 changes: 2 additions & 2 deletions docs/fsharp/tutorials/fsharp-interactive/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ ms.date: 05/16/2016
# Interactive Programming with F# #

> [!NOTE]
This article currently describes the experience for Windows only. It will be rewritten.
> This article currently describes the experience for Windows only. It will be rewritten.

> [!NOTE]
The API reference link will take you to MSDN. The docs.microsoft.com API reference is not complete.
> The API reference link will take you to MSDN. The docs.microsoft.com API reference is not complete.

F# Interactive (fsi.exe) is used to run F# code interactively at the console, or to execute F# scripts. In other words, F# interactive executes a REPL (Read, Evaluate, Print Loop) for the F# language.

Expand Down
2 changes: 1 addition & 1 deletion docs/fsharp/tutorials/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ redirect_url: /dotnet/fsharp/index
# F# Tutorials

> [!NOTE]
This is still in-progress.
> This is still in-progress.