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
moduleExtensions=openSystem.Collections.GenerictypeIEnumerable<'T>with/// Repeat each element of the sequence n timesmemberxs.RepeatElements(n:int)=seq{for x in xs dofor_in1.. n -> x
}
Expected behavior
That the example from the documentation compiles
Actual behavior
Compilation error :
One or more of the declared type parameters for this type extension have a missing or wrong type constraint not matching the original type constraints on 'IEnumerable<_>'F# Compiler[957](https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/compiler-messages/fs0957)
Known workarounds
Use previous version of .net
Create a C# extension method
Related information
Provide any related information (optional):
Operating system : Windows 11, Mac OS X
.NET Runtime kind: .NET Core 9 9.0.101, 9.0.102
Editing Tools (Visual Studio Code)
The text was updated successfully, but these errors were encountered:
Please provide a succinct description of the issue.
Repro steps
See documentation for optional-type-extensions:
Create a file such as Extensions.fsx:
Expected behavior
That the example from the documentation compiles
Actual behavior
Compilation error :
Known workarounds
Related information
Provide any related information (optional):
The text was updated successfully, but these errors were encountered: