Bubble Sort on list, pure functional