Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

Latest commit

 

History

History

example3

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

example3

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 ..