Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dotNET Platform
fsharp
提交
d8544fe2
F
fsharp
项目概览
dotNET Platform
/
fsharp
12 个月 前同步成功
通知
0
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
fsharp
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d8544fe2
编写于
11月 19, 2017
作者:
N
ncave
提交者:
Kevin Ransom (msft)
11月 19, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
minor IL simplification (#3975)
上级
e0596f3a
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
10 addition
and
16 deletion
+10
-16
src/fsharp/FSharp.Core/list.fs
src/fsharp/FSharp.Core/list.fs
+9
-15
src/fsharp/FSharp.Core/list.fsi
src/fsharp/FSharp.Core/list.fsi
+1
-1
未找到文件。
src/fsharp/FSharp.Core/list.fs
浏览文件 @
d8544fe2
...
@@ -212,15 +212,11 @@ namespace Microsoft.FSharp.Collections
...
@@ -212,15 +212,11 @@ namespace Microsoft.FSharp.Collections
[<
CompiledName
(
"Fold"
)>]
[<
CompiledName
(
"Fold"
)>]
let
fold
<
'
T
,
'
State
>
folder
(
state
:
'
State
)
(
list
:
'
T
list
)
=
let
fold
<
'
T
,
'
State
>
folder
(
state
:
'
State
)
(
list
:
'
T
list
)
=
match
list
with
let
f
=
OptimizedClosures
.
FSharpFunc
<_,_,_>.
Adapt
(
folder
)
|
[]
->
state
let
mutable
acc
=
state
|
_
->
for
x
in
list
do
let
f
=
OptimizedClosures
.
FSharpFunc
<_,_,_>.
Adapt
(
folder
)
acc
<-
f
.
Invoke
(
acc
,
x
)
let
rec
loop
s
xs
=
acc
match
xs
with
|
[]
->
s
|
h
::
t
->
loop
(
f
.
Invoke
(
s
,
h
))
t
loop
state
list
[<
CompiledName
(
"Pairwise"
)>]
[<
CompiledName
(
"Pairwise"
)>]
let
pairwise
(
list
:
'
T
list
)
=
let
pairwise
(
list
:
'
T
list
)
=
...
@@ -356,12 +352,10 @@ namespace Microsoft.FSharp.Collections
...
@@ -356,12 +352,10 @@ namespace Microsoft.FSharp.Collections
let
exists
predicate
list
=
Microsoft
.
FSharp
.
Primitives
.
Basics
.
List
.
exists
predicate
list
let
exists
predicate
list
=
Microsoft
.
FSharp
.
Primitives
.
Basics
.
List
.
exists
predicate
list
[<
CompiledName
(
"Contains"
)>]
[<
CompiledName
(
"Contains"
)>]
let
inline
contains
value
source
=
let
rec
contains
value
source
=
let
rec
contains
e
xs1
=
match
source
with
match
xs1
with
|
[]
->
false
|
[]
->
false
|
h
::
t
->
if
h
=
value
then
true
else
contains
value
t
|
h1
::
t1
->
e
=
h1
||
contains
e
t1
contains
value
source
let
rec
exists2aux
(
f
:
OptimizedClosures
.
FSharpFunc
<_,_,_>)
list1
list2
=
let
rec
exists2aux
(
f
:
OptimizedClosures
.
FSharpFunc
<_,_,_>)
list1
list2
=
match
list1
,
list2
with
match
list1
,
list2
with
...
...
src/fsharp/FSharp.Core/list.fsi
浏览文件 @
d8544fe2
...
@@ -102,7 +102,7 @@ namespace Microsoft.FSharp.Collections
...
@@ -102,7 +102,7 @@ namespace Microsoft.FSharp.Collections
/// <param name="source">The input list.</param>
/// <param name="source">The input list.</param>
/// <returns>True if the input list contains the specified element; false otherwise.</returns>
/// <returns>True if the input list contains the specified element; false otherwise.</returns>
[<
CompiledName
(
"Contains"
)>]
[<
CompiledName
(
"Contains"
)>]
val
inline
contains
:
value
:
'
T
->
source
:
'
T
list
->
bool
when
'
T
:
equality
val
contains
:
value
:
'
T
->
source
:
'
T
list
->
bool
when
'
T
:
equality
/// <summary>Returns a list that contains no duplicate entries according to generic hash and
/// <summary>Returns a list that contains no duplicate entries according to generic hash and
/// equality comparisons on the entries.
/// equality comparisons on the entries.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录