-
Notifications
You must be signed in to change notification settings - Fork 30
Closed
Description
This code works:
function array.sort() {
let pass = 0;
for( ! self.sorted?() ) {
let i = 1;
let l = len(self);
for( i < l ) {
if ( self[i] < self[i-1] ) {
self = self.swap( i-1, i);
}
i++;
}
pass +=1;
}
return self;
}
However remove the use of pass
and it panics. Seems to be the return-value of the for
looks is causing isseus - suspect it doesn't return a value and it should.
Metadata
Metadata
Assignees
Labels
No labels