相关疑难解决方法(0)

获取Array,List或Seq的第N个元素的不同参数顺序

在获取Array,List或Seq的第N个元素的函数中有不同的参数顺序是否有充分的理由:

Array.get source index
List .nth source index
Seq  .nth index  source
Run Code Online (Sandbox Code Playgroud)

我想使用管道运算符,它似乎只能用Seq:

s |> Seq.nth n
Run Code Online (Sandbox Code Playgroud)

有没有办法与Array或List使用相同的表示法?

f# pipeline

12
推荐指数
3
解决办法
1190
查看次数

标签 统计

f# ×1

pipeline ×1