I recently noticed that there was a very clear implementation of insertion sort here :
Insertion sort in clojure throws StackOverFlow error
- which suffers from a memory overflow, due to the fact that concat lazily joins lists. I was wondering :
What strategies can we apply to "de-lazying" a list when we want better performance on large collections ?