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

Latest commit

 

History

History
12 lines (7 loc) · 535 Bytes

README.md

File metadata and controls

12 lines (7 loc) · 535 Bytes

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