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
4 changes: 1 addition & 3 deletions concepts/options/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ let keepIfPositive (a: int) : int option = if a > 0 then Some a else None

~~~~exercism/note
`T option` is the postfix syntax equivalent for `Option<T>`; the two syntax forms can be used interchangeably.
However, according to the F# Style Guide, the postfix notation is preferred for Option types (see [F# Style Guide section on Formatting Types and Type Annotations][fsharp-style-guide-generic-types-syntax]).
However, according to the F# Style Guide, the postfix notation is preferred for Option types (see [F# Style Guide section on Formatting Types and Type Annotations](https://learn.microsoft.com/en-us/dotnet/fsharp/style-guide/formatting#for-types-prefer-prefix-syntax-for-generics-foot-with-some-specific-exceptions)).
~~~~

A typical use case for an `Option` is search functions.
Expand Down Expand Up @@ -69,5 +69,3 @@ Option.defaultValue 0 None

The `Option` module also includes functions that correspond to the functions that are available for lists, arrays, sequences, and other collection types, such as `Option.map`, `Option.iter`, `Option.forall`, `Option.count`.
These functions enable `Option`s to be treated like a collection of zero or one elements.

[fsharp-style-guide-generic-types-syntax]: https://learn.microsoft.com/en-us/dotnet/fsharp/style-guide/formatting#for-types-prefer-prefix-syntax-for-generics-foot-with-some-specific-exceptions
4 changes: 1 addition & 3 deletions concepts/options/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ let keepIfPositive (a: int) : int option = if a > 0 then Some a else None

~~~~exercism/note
`T option` is the postfix syntax equivalent for `Option<T>`; the two syntax forms can be used interchangeably.
However, according to the F# Style Guide, the postfix notation is preferred for Option types (see [F# Style Guide section on Formatting Types and Type Annotations][fsharp-style-guide-generic-types-syntax]).
However, according to the F# Style Guide, the postfix notation is preferred for Option types (see [F# Style Guide section on Formatting Types and Type Annotations](https://learn.microsoft.com/en-us/dotnet/fsharp/style-guide/formatting#for-types-prefer-prefix-syntax-for-generics-foot-with-some-specific-exceptions)).
~~~~

## Reading the content of an Option value
Expand Down Expand Up @@ -51,5 +51,3 @@ Option.defaultValue "" (Some "F#")
Option.defaultValue 0 None
// --> 0
```

[fsharp-style-guide-generic-types-syntax]: https://learn.microsoft.com/en-us/dotnet/fsharp/style-guide/formatting#for-types-prefer-prefix-syntax-for-generics-foot-with-some-specific-exceptions
4 changes: 1 addition & 3 deletions exercises/concept/role-playing-game/.docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ let keepIfPositive (a: int) : int option = if a > 0 then Some a else None

~~~~exercism/note
`T option` is the postfix syntax equivalent for `Option<T>`; the two syntax forms can be used interchangeably.
However, according to the F# Style Guide, the postfix notation is preferred for Option types (see [F# Style Guide section on Formatting Types and Type Annotations][fsharp-style-guide-generic-types-syntax]).
However, according to the F# Style Guide, the postfix notation is preferred for Option types (see [F# Style Guide section on Formatting Types and Type Annotations](https://learn.microsoft.com/en-us/dotnet/fsharp/style-guide/formatting#for-types-prefer-prefix-syntax-for-generics-foot-with-some-specific-exceptions)).
~~~~

## Reading the content of an Option value
Expand Down Expand Up @@ -51,5 +51,3 @@ Option.defaultValue "" (Some "F#")
Option.defaultValue 0 None
// --> 0
```

[fsharp-style-guide-generic-types-syntax]: https://learn.microsoft.com/en-us/dotnet/fsharp/style-guide/formatting#for-types-prefer-prefix-syntax-for-generics-foot-with-some-specific-exceptions