You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let sumEachItem (myList:int list) = sumEachItem' 0 myList
384
384
```
385
385
386
-
See the [List Module](https://fsharp.github.io/fsharp-core-docs/reference/fsharp-collections-listmodule.html) for built-in functions.
386
+
See [Lists (MS Learn)](https://learn.microsoft.com/en-us/dotnet/fsharp/language-reference/lists) to learn more. See the [List Module](https://fsharp.github.io/fsharp-core-docs/reference/fsharp-collections-listmodule.html) for built-in functions.
387
387
388
388
<divid="collections-arrays"></div>
389
389
390
390
## Arrays
391
391
392
-
*Arrays* are fixed-size, zero-based, collections of consecutive data elements maintained as one block of memory. They are *mutable*; individual elements can be changed.
392
+
*Arrays* are fixed-size, zero-based collections of consecutive data elements maintained as one block of memory. They are *mutable*; individual elements can be changed.
393
393
394
394
395
395
```fsharp
@@ -416,24 +416,24 @@ match myArray with
416
416
| [| _; 4 |] -> ... // match array with 2 items, second item = 4
417
417
```
418
418
419
-
See the [Array Module](https://fsharp.github.io/fsharp-core-docs/reference/fsharp-collections-arraymodule.html) for built-in functions.
419
+
See [Arrays (MS Learn)](https://learn.microsoft.com/en-us/dotnet/fsharp/language-reference/arrays) to learn more. See the [Array Module](https://fsharp.github.io/fsharp-core-docs/reference/fsharp-collections-arraymodule.html) for built-in functions.
420
420
421
421
<divid="collections-sequences"></div>
422
422
423
423
## Sequences
424
424
425
-
A *sequence* is a logical series of elements of the same type. `seq<'t>` is an alias for [`System.Collections.Generic.IEnumerable<'t>`](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1).
425
+
A *sequence* is a logical series of elements of the same type. Sequences are lazily evaluated, and individual elements are computed only as required. `seq<'t>` is an alias for [`System.Collections.Generic.IEnumerable<'t>`](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1).
426
426
427
427
```fsharp
428
-
// Create
428
+
let emptySeq : int seq = seq { } // empty works as of F# 9
429
429
let seq1 = { 1; 2 }
430
430
let seq2 = seq {
431
431
1
432
432
2 }
433
433
let seq3 = seq { 1..2..9 } // start..increment..last; 1,3,5,7,9
434
434
```
435
435
436
-
See the [Seq Module](https://fsharp.github.io/fsharp-core-docs/reference/fsharp-collections-seqmodule.html) for built-in functions.
436
+
See [Sequences (MS Learn)](https://learn.microsoft.com/en-us/dotnet/fsharp/language-reference/sequences) to learn more. See the [Seq Module](https://fsharp.github.io/fsharp-core-docs/reference/fsharp-collections-seqmodule.html) for built-in functions.
0 commit comments