Organization of two sets of points to create consecutive closed curves?

How do I repeat the organization of two sets of points to create consecutive closed curves?

sine cylinder.gh (22.6 KB)

sine cylinder v0.gh (30.7 KB)