Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
because the input is passed by reference, it's not a copy of it. So if you modify it inside your function, any other function outside that sees the exact same instance of this object will see the modifications too (even if not expected).
But if I mutate the input in the function how does it change it outside the function?
I don't get why that matters though (and I tried that, the same thing happened though)
edit: I got my solution to work with some really weird workarounds, but it's obviously not supposed to be done like this.
Easy: don't mutate the input. ;p
I'm having the same problem, did you solve it and if so, how?
Did you mutate the input?