Reputation: 723
I need to define a function, which takes a sequence
and integers i
and n
as parameters and returns sub list or sub sequence of this seq, defined as followed:
Upvotes: 0
Views: 192
Reputation: 12184
You can write:
let subSeq i n = Seq.skip i >> Seq.take n
Which is used, e.g.:
let result = subSeq 5 10 [0..20]
Upvotes: 4