Find common directory path: Difference between revisions
Content deleted Content added
Drkameleon (talk | contribs) |
|||
Line 1,507:
</lang>
=={{header|Mathematica}}/{{header|Wolfram Language}}==
<lang Mathematica>FindCommonDirectory[x_] := If[StringTake[#, -1] != "/", StringTake[#, Max[StringPosition[#, "/"]]], #] &
[Fold[LongestCommonSubsequence, First[x] , Rest[x]]]
|