Sattolo cycle: Difference between revisions

No edit summary
Line 1,029:
include "NSLog.incl"
 
void local fn SattoloCycle( mutArr as CFMutableArrayRef )
NSUInteger i, j, count = len(mutArr)
 
for i = 0count to counti > 0 step - 1
cln j = rndarc4random_uniform(i);
MutableArrayExchangeObjects( mutArr, i, j )
next
end fn
 
NSUInteger i, count
CFMutableArrayRef mutArr
NSUInteger i, count i
mutArr = fn MutableArrayWithArray( @[@"Alpha",@"Bravo",@"Charlie",@"Delta",@"Echo",@"Foxtrot"] )
mutArr = fn MutableArrayWithObjects( @0, @1, @2, @3, @4, @5, @6, @7, @8, @9 )
NSLog( @"Before shuffle: %@", fn ArrayComponentsJoinedByString( mutArr, @"" ) )
 
for i = 01 to 5100
fn SattoloCycle( mutArr )
NSLog( @"%@", fn ArrayComponentsJoinedByString( mutArr, @"" ) )
next
 
Line 1,100 ⟶ 1,101:
)
</pre>
 
 
 
 
=={{header|Go}}==
717

edits