2

There is this question with excellent answers on this topic

Enhancing collections is a rather common use case and some of these answers are no longer valid. Miles Sabin's answer has the prettiest syntax but HasElem and HasRepr are no longer available in the language. Other answers suggest using View bounds, which are deprecated.

What is the "proper way" to enhance collections nowadays (2.11+)?

Is there a way to avoid using the unusual builder syntax and use normal collection methods instead (as in Mile's answer)?

Community
  • 1
  • 1
V-Lamp
  • 1,630
  • 10
  • 18

0 Answers0