Order two numerical lists: Difference between revisions
Content added Content deleted
m (→{{header|Phix}}: syntax coloured) |
Drkameleon (talk | contribs) (Added Arturo implementation) |
||
Line 729: | Line 729: | ||
bx lr @ return |
bx lr @ return |
||
</lang> |
</lang> |
||
=={{header|Arturo}}== |
|||
<lang rebol>compareLists: function [a,b][ |
|||
loop 0..min @[size a, size b] 'i [ |
|||
if a\[i] < b\[i] -> return true |
|||
if a\[i] > b\[i] -> return false |
|||
] |
|||
return less? size a size b |
|||
] |
|||
alias.infix '<=> 'compareLists |
|||
do [ |
|||
print [1 2 1 3 2] <=> [1 2 0 4 4 0 0 0] |
|||
]</lang> |
|||
{{out}} |
|||
<pre>false</pre> |
|||
=={{header|AutoHotkey}}== |
=={{header|AutoHotkey}}== |