Mid-points in list of segments with Zip
A1 = (-2, 1, 0)
A2 = (1, 3, 0)
A3 = (1, 1, 3)
A4 = (2, -1, 2)
L = CellRange(A1,A4)
Lseg = Unique(Flatten(Zip(Zip(If(Length(Segment(P, Q)) ≠ 0, Segment(P, Q)), P, L), Q, L)))
Lmid = Zip(Midpoint( Point(seg,0), Point(seg,1)), seg, Lseg)
Also this version by Thijs
Lseg=Flatten(Zip(Zip(Segment(L(j),L(k)), j,1…(k-1)), k,2…4))
Lmid = Zip( Point(seg,0.5), seg, Lseg)