MicrosoftDocs / visualfsharpdocs

Frozen documentation repository for legacy MSDN Content for Visual F#
https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/visual-fsharp
Creative Commons Attribution 4.0 International
102 stars 110 forks source link

List.truncate example output is wrong #330

Open loop-evgeny opened 5 years ago

loop-evgeny commented 5 years ago

https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/list.truncate%5B%27t%5D-function-%5Bfsharp%5D?f=255&MSPPError=-2147217396

says the output of the sample code is

[1; 4; 9; 16; 25]
[1; 4; 9; 16; 25; 36; 49; 64; 81; 100]
[1; 4; 9; 16; 25]

But the actual output is:

1 4 9 16 25
1 4 9 16 25
1 4 9 16 25 36 49 64 81 100

Also the description "Returns a list that with at most N elements." could be clarified, e.g. "Returns a new list that contains at most N elements from the start of the input list."