Sorting algorithms/Insertion sort: Difference between revisions
Content added Content deleted
m (moved realbasic back to its own section; minor markup edits to rexx) |
m (→Icon and Unicon: header simplification) |
||
Line 558: | Line 558: | ||
ENDDO</lang> |
ENDDO</lang> |
||
== |
=={{header|Icon}} and {{header|Unicon}}== |
||
==={{header|Icon}}=== |
|||
<lang Icon>procedure main() #: demonstrate various ways to sort a list and string |
<lang Icon>procedure main() #: demonstrate various ways to sort a list and string |
||
demosort(insertionsort,[3, 14, 1, 5, 9, 2, 6, 3],"qwerty") |
demosort(insertionsort,[3, 14, 1, 5, 9, 2, 6, 3],"qwerty") |
||
Line 586: | Line 585: | ||
on string : "qwerty" |
on string : "qwerty" |
||
with op = &null: "eqrtwy" (0 ms)</pre> |
with op = &null: "eqrtwy" (0 ms)</pre> |
||
==={{header|Unicon}}=== |
|||
The Icon solution works in Unicon. |
|||
=={{header|J}}== |
=={{header|J}}== |