Just looking at the examples I'm missing single constructor per type, instead of builder pattern. Also the idea you need to allocate elements in a collection feels cumbersome to me. Why just not shuv a List in? Both these approaches rely on mutation which doesn't feel it caters to FP.
Just looking at the examples I'm missing single constructor per type, instead of builder pattern. Also the idea you need to allocate elements in a collection feels cumbersome to me. Why just not shuv a List in? Both these approaches rely on mutation which doesn't feel it caters to FP.