Category:Initlib: Difference between revisions

Content added Content deleted
(transpose)
No edit summary
Line 85: Line 85:
[ rup [ /dup rdown /exec /not [{pop}] aif ] atox forall ]
[ rup [ /dup rdown /exec /not [{pop}] aif ] atox forall ]
end}.
end}.
/zip {
[rup{
dup length 0 eq rdown dup length 0 eq rdown or {exit} if
uncons rdown uncons rdown 4 2 roll unit cons rup exch
} loop pop pop]
}.


/transpose {
/transpose {
Line 98: Line 92:
} loop ] {reverse} map
} loop ] {reverse} map
}.
}.
/zip {transpose}.

% [[1 2 3 4 ] [5 6 7 8] [9 10 11 12]] transpose
% [[1 2 3 4 ] [5 6 7 8] [9 10 11 12]] transpose
/all? {
/all? {