Order two numerical lists: Difference between revisions

Content added Content deleted
(Order two numerical lists en Yabasic)
Line 1,391: Line 1,391:
end proc:</lang>
end proc:</lang>


=={{header|Mathematica}}==
=={{header|Mathematica}}/{{header|Wolfram Language}}==
<lang Mathematica>
<lang Mathematica>order[List1_, List2_] := With[{
order[List1_, List2_] := With[{
L1 = List1[[1 ;; Min @@ Length /@ {List1, List2}]],
L1 = List1[[1 ;; Min @@ Length /@ {List1, List2}]],
L2 = List2[[1 ;; Min @@ Length /@ {List1, List2}]]
L2 = List2[[1 ;; Min @@ Length /@ {List1, List2}]]
Line 1,405: Line 1,404:
order[ {1, 2, 1, 3, 2}, {1, 2, 0, 4, 4, 0, 0, 0} ]
order[ {1, 2, 1, 3, 2}, {1, 2, 0, 4, 4, 0, 0, 0} ]
->False
->False

order[ {1, 2}, {1, 2, 4, 4, 0, 0} ]
order[ {1, 2}, {1, 2, 4, 4, 0, 0} ]
->True</pre>
->True</pre>