Function adapting to mutable or non-mutable input
I wanted to build a function/method that could adapt if a non-mutable or mutable reference was provided.
I tried something like this (playground):
I wanted to build a function/method that could adapt if a non-mutable or mutable reference was provided.
I tried something like this (playground):