Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,23 @@
|
|||
[ stack ] is sorted ( --> s )
|
||||
|
||||
[ rot tuck over peek
|
||||
2swap tuck over peek
|
||||
dip rot 2dup < iff
|
||||
[ dip [ unrot poke ]
|
||||
swap rot poke
|
||||
sorted release
|
||||
false sorted put ]
|
||||
else
|
||||
[ drop 2drop nip ] ] is >exch ( [ n n --> [ )
|
||||
|
||||
[ dup size 1 - times
|
||||
[ true sorted put
|
||||
i 1+ times
|
||||
[ i^ dup 1+ >exch ]
|
||||
sorted take if
|
||||
conclude ] ] is bubble ( [ --> [ )
|
||||
|
||||
[] 20 times
|
||||
[ 10 random join ]
|
||||
say "Before: " dup echo cr
|
||||
say "After: " bubble echo
|
||||
Loading…
Add table
Add a link
Reference in a new issue