Aug 6, 2021
Indeed you could do that. The reason I didn’t is because this is leading up to a more general pattern in later articles, where it becomes necessary for your functions f/g/h to manage the construction of the wrapped value. Consider the case where the wrapper class carries multiple items - for example, the value you are working on, plus auxiliary state such as a log, and you want to be able to return both. Hopefully it will become clear later!