concept bubble sort in category haskell

This is an excerpt from Manning's book Get Programming with Haskell.
Writing a bubble sort with Haskell has a few large issues. The first is that you’ve relied heavily on lists as your primary data structure, but they’re not nearly as efficient as proper arrays for this type of problem. A much larger issue is the requirement that the sort be in place; You can’t create a copy of your array. Nearly all the code you’ve written in this book relies on changing the state of a data structure the functional way: creating a new version of the structure and discarding the original. For the majority of problems, this is both reasonably efficient and easy to do. Sorting an array is one case where you absolutely need to modify the state of a data structure for reasons of efficiency.