Changeset 311
- Timestamp:
- 02/26/05 11:37:28 (4 years ago)
- svk:copy_cache_prev:
- 1041
- Files:
-
- 1 modified
-
examples/quicksort.p6 (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
examples/quicksort.p6
r80 r311 5 5 6 6 multi sub quicksort ( *$x, *@xs ) { 7 my @pre = @xs.grep:{ $_ < $x }; 8 my @post = @xs.grep:{ $_ >= $x }; 7 my @pre = @xs.grep:{ $x > $_}; 8 my @post = @xs.grep:{ $x <= $_ }; 9 # my @post = @xs.grep:{ $_ >= $x }; # XXX FIXME 9 10 (@pre.quicksort, $x, @post.quicksort); 10 11 }
