The intention of the playground code is that I want to box Iterator + Clone
into a single variable so I don't have to duplicate complex logic.
In this example, the function requires_clone_iterator
is simple but in my actual code it's actually 4 iterator extension method call with 4 match arms so I need to write 16 iterator extension method calls.
Is boxing Clone
trait or similar method possible? Or, should I just create generic function to do this?