I was reading a book called Algebra of Programming, when I came upon an optimazation about a list concatentation operations.
It says that the (++) operator takes quardraic time causing the program to be slow, and gives an optimization that I couldn't quite understand.
A little more research on this topic leads me to the difference list, stating that left association makes the (++) operations are slow.
But it didn't quite explain why or offered any solution.
Curosity got the best of me, so I decided to experiment. I first created a function to generate positive integer list using concatation.