Files
l2/tests/arr_static_sort.sl

26 lines
458 B
Plaintext
Raw Normal View History

2026-02-18 16:05:48 +01:00
import ../stdlib/stdlib.sl
import ../stdlib/io.sl
import ../stdlib/arr.sl
word main
[ 4 1 3 2 ] dup arr_sort
dup 0 arr_get puti cr
dup 1 arr_get puti cr
dup 2 arr_get puti cr
dup 3 arr_get puti cr
arr_free
2026-02-18 16:05:48 +01:00
[ 9 5 7 ] dup arr_sorted
dup 0 arr_get puti cr
dup 1 arr_get puti cr
dup 2 arr_get puti cr
2026-02-18 16:05:48 +01:00
swap
dup 0 arr_get puti cr
dup 1 arr_get puti cr
dup 2 arr_get puti cr
2026-02-18 16:05:48 +01:00
arr_free
arr_free
2026-02-18 16:05:48 +01:00
end