I'm trying to recreate my own function of Seq.zip. It needs to do the exact same thing as Seq.zip but only using seq to create it. Here is my code so far:
let rec seqZip s1 s2 =
seq {
let e1 = Seq.item 0 s1
let e2 = Seq.item 0 s2
let rec helper s1 s2 n =
match s1, s2 with
| s1, s2 when n > s1.Length && n > s2.Length -> yield ()
| s1, s2 -> yield (Seq.item (n+1) s1, Seq.item (n+1) s2)
helper s1 s2 0
}
I'm not sure I even need a helper function in there but do you have any suggestions?