相关疑难解决方法(0)

F# - how to group previous, this and next elements in circular Seq

In F# How to best convert a finite Sequence-like seq [0; 1; 2; 3; 4] into a Sequence of tuples like seq [4,0,1 ; 0,1,2 ; 1,2,3 ; 2,3,4 ; 3,4,0] ?

Addition: My Seq represents circular data. In this case the vertices of a closed polyline. I need the neighboring elements to compute the angle of each corner.

f#

4
推荐指数
1
解决办法
1080
查看次数

标签 统计

f# ×1