History

moved to local implementation of array.shuffle()

Ge Wang committed 3 years ago

Commit 3dd124e1 parent 772c0aa5 files · +49 −21Browse files

Showing the changes to examples/array/array_shuffle.ck (1 of 5 files). Show all

Unified · Split

examples/array/array_shuffle.ck+2−2
@@ -20,10 +20,10 @@ repeat( 10 ) · 19 unmodified lines
20 a.shuffle();20 a.shuffle();
21}21}
22 22
23// a way to do random without replacement23// one way to do random without replacement
24repeat( 3 )24repeat( 3 )
25{25{
26 cherr <= "--- random with replacment --- " <= IO.nl();26 cherr <= "--- random without replacment --- " <= IO.nl();
27 // shuffle!27 // shuffle!
28 a.shuffle();28 a.shuffle();
29 // just go through array in order after shuffle29 // just go through array in order after shuffle

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t