Closed
Description
I just ran down a nasty bug related to this code below:
Line 413 in 493afba
I did not realize that every time I was creating a new list with List()
, I was getting the same instance of List
. This seems counterintuitive in a library based on the idea of immutability.
Some code in the project was mutating an instance of an empty list which caused all subsequent newly minted lists to be non-empty. Obviously the code in my project was incorrect, but I came here to suggest not using a singleton pattern here regardless.