Sorting algorithms/Bogosort: Difference between revisions
Content added Content deleted
m (→{{header|Sidef}}: update) |
(→Insitux: implementation) |
||
Line 1,641: | Line 1,641: | ||
} |
} |
||
];</syntaxhighlight> |
];</syntaxhighlight> |
||
=={{header|Insitux}}== |
|||
{{Trans|Clojure}} |
|||
<syntaxhighlight lang="insitux">(function bogo-sort order list |
|||
(return-when (empty? list) []) |
|||
(if (.. order list) |
|||
list |
|||
(recur order (shuffle list)))) |
|||
(bogo-sort < [7 5 12 1 4 2 23 18])</syntaxhighlight> |
|||
Even with this small list the web REPL sometimes exceeds its default recur budget (1e4 - 10000): |
|||
<pre>4:6 (recur order (shuffle list)))) |
|||
Budget Error: recurred too many times.</pre> |
|||
=={{header|Io}}== |
=={{header|Io}}== |