Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void bubbleSort(alias op, T)(T[] inArray) {
- foreach (i, ref a; inArray) {
- foreach (ref b; inArray[i+1..$]) {
- if (mixin(op)) {
- auto tmp = a;
- a = b;
- b = tmp;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement