RosettaCodeData/Task/Order-two-numerical-lists/Mathematica/order-two-numerical-lists.math
Ingy döt Net b83f433714 tasks a-s
2013-04-10 23:57:08 -07:00

8 lines
249 B
Text

order[List1_, List2_] := With[{
L1 = List1[[1 ;; Min @@ Length /@ {List1, List2}]],
L2 = List2[[1 ;; Min @@ Length /@ {List1, List2}]]
},
If [Thread[Order[L1, L2]] == 0,
Length[List1] < Length[List2],
Thread[Order[L1, L2]] == 1
]]