I am trying to implement all the sorting algorithms (for lists) in Haskell. Haskell is a pure functional programming language. Algorithms implemented in Haskell tend to be very accessible, and the structure of the implementation will usually represent the algorithms itself. Therefore, reading Haskell implementation for the sorting algorithms would be very helpful for understanding them as well.
In Haskell, it is quite easy to implement ways to monitor and collect information during the sort (e.g. through using StateT
, WriteT
etc.), but that is an additional feature on top of the sorting algorithms. After implementing the sorting algorithms in a single module, I might also add a monitoring utility for them.