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.
In general, it's not a good practice to reassign the method argument.
If you are curious why - then please look at these method signatures.
It's a pretty helpful example because Node arguments have a meaningful name (and in general they must be meaningful).
And then if we treat an argument head as a usual variable its name becomes pointless.
And moreover in the case, if a method is much larger than a few lines or has an intricate logic then it's easy to introduce a bug because you forget that 'head' no longer points to the head.
This comment is hidden because it contains spoiler information about the solution