Skip to content

Commit 07aa04a

Browse files
committed
FavourSingleton: improve docs
1 parent 5c95835 commit 07aa04a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docs/content/how-tos/rules/FL0089.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ Rule to detect usage of lists or arrays with only one item.
1414

1515
## Rationale
1616

17-
List.singleton/Array.singleton is more readable and explicit than [ foo]/[| foo |].
17+
`List.singleton foo`/`Array.singleton foo` is more readable and explicit than `[foo]`/`[|foo|]`.
18+
Especially if we take in account that F# newbies may not yet be familiar with the difference between
19+
inline array vs list instantiation; and square brackets with only one element could potentially be
20+
confused with an indexing accessor.
1821

1922
## How To Fix
2023

0 commit comments

Comments
 (0)