F# Interactive session:
> let seq1 = seq [("city1", "pin1"); ("city2", "pin2")];;
val seq1 : seq<string * string> = [("city1", "pin1"); ("city2", "pin2")]
> let seq2 = seq [("pin1", "product1"); ("pin2", "product2")];;
val seq2 : seq<string * string> = [("pin1", "product1"); ("pin2", "product2")]
> Seq.zip seq1 seq2;;
val it : seq<(string * string) * (string * string)> =
seq
[(("city1", "pin1"), ("pin1", "product1"));
(("city2", "pin2"), ("pin2", "product2"))]
> Seq.zip seq1 seq2 |> Seq.map (fun (x,y) -> (fst x, snd y));;
val it : seq<string * string> =
seq [("city1", "product1"); ("city2", "product2")]
Also, you must be able to use Linq queries on sequences, just be sure you have a reference to the System.Linq assembly and opened a namespace open System.Linq
UPDATE: in a complex scenario you can use sequence expressions as follows:
open System
let seq1 = seq [("city1", "pin1"); ("city2", "pin2"); ("city1", "pin3"); ("city1", "pin4")]
let seq2 = seq [("pin1", "product1"); ("pin2", "product2"); ("pin1", "product3"); ("pin2", "product1")]
let joinSeq = seq { for x in seq1 do
for y in seq2 do
let city, pin = x
let pin1, product = y
if pin = pin1 then
yield(city, product) }
for(x,y)in joinSeq do
printfn "%s: %s" x y
Console.ReadKey() |> ignore