let's try decorating a method function ..
in this example, the somedata
struct simply has one value, that's a string
, this struct has a method attached, called printSomething
, let's assume we want to
decoreate that function...
what (to me) seemed confusing is the fact that you don't really have to care about the function's receiver (which makes it a method of somedata
) and instead all you
really do care about is the "plain" function's signature of func()
...
take a look .. maybe leave some comments ..