Belisarius' answer works well if you are willing to work with indexes. If you prefer to work with the elements themselves, here is a rule-based solution. innrJoin[data : {{_} ..}, a_, b_] := data //. {x___, {a}, y___, {b}, z___} :> {x, {a, Sequence @@ Flatten[{y}], b}, z} innrJoin[{{1}, {2}, {3}, {4}}, 2, 3] >{{1}, {2, 3}, {4}} innrJoin[{{a}, {b}, {c}, {d}}, a, c] >{{a, b, c}, {d}}