JortSort: Difference between revisions

Content added Content deleted
(Added Arturo implementation)
Line 267: Line 267:
{{Out}}
{{Out}}
<pre>{false, true}</pre>
<pre>{false, true}</pre>

=={{header|Arturo}}==

<lang rebol>jortSort?: function [a]->
a = sort a

test: function [a]->
print [a "is" (jortSort? a)? -> "sorted" -> "not sorted"]

test [1 2 3]
test [2 3 1]

print ""

test ["a" "b" "c"]
test ["c" "a" "b"]</lang>

{{out}}

<pre>[1 2 3] is sorted
[2 3 1] is not sorted

[a b c] is sorted
[c a b] is not sorted</pre>


=={{header|AutoHotkey}}==
=={{header|AutoHotkey}}==