Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc4ef4ad

Browse files
empty array singleton table
1 parent205f5cf commitc4ef4ad

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎src/fsharp/FSharp.Core/array.fs‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,12 @@ namespace Microsoft.FSharp.Collections
7474
if array.Length=0then invalidArg"array"(SR.GetString(SR.notEnoughElements))
7575
Microsoft.FSharp.Primitives.Basics.Array.subUnchecked1(array.Length-1) array
7676

77+
typeEmptyArray<'T>()=
78+
static letempty=([||]: 'T[])
79+
static memberEmpty= empty
80+
7781
[<CompiledName("Empty")>]
78-
letempty<'T>:'T[]=[||]
82+
letempty<'T>:'T[]=EmptyArray.Empty
7983

8084
[<CodeAnalysis.SuppressMessage("Microsoft.Naming","CA1704:IdentifiersShouldBeSpelledCorrectly")>]
8185
[<CompiledName("CopyTo")>]

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp