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 (2 of 5 files). Show all

Unified · Split

2 files
  1. examples/array/array_reverse.ck +1 −1
  2. examples/array/array_shuffle.ck +2 −2
examples/array/array_reverse.ck+1−1
@@ -23,4 +23,4 @@ fun void print_arr(int a[]) { · 22 unmodified lines
2323 cherr <= a[i] <= " ";
2424 }
2525 cherr <= IO.nl();
26−}
26+}
examples/array/array_shuffle.ck+2−2
@@ -20,10 +20,10 @@ repeat( 10 ) · 19 unmodified lines
2020 a.shuffle();
2121 }
2222
23−// a way to do random without replacement
23+// one way to do random without replacement
2424 repeat( 3 )
2525 {
26− cherr <= "--- random with replacment --- " <= IO.nl();
26+ cherr <= "--- random without replacment --- " <= IO.nl();
2727 // shuffle!
2828 a.shuffle();
2929 // 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