Find common directory path: Difference between revisions
Content deleted Content added
Drkameleon (talk | contribs) Added Arturo implementation |
Drkameleon (talk | contribs) |
||
Line 186: | Line 186: | ||
<lang rebol>commonPathPrefix: function [lst][ |
<lang rebol>commonPathPrefix: function [lst][ |
||
paths: map lst => [split. |
paths: map lst => [split.by:"/" &] |
||
common: new [] |
common: new [] |
||
Line 200: | Line 200: | ||
if found -> 'common ++ part |
if found -> 'common ++ part |
||
] |
] |
||
return "/" |
return join.with:"/" common |
||
] |
] |
||