All I know about the difference between them is in the image below.
scrypto101 explanantion of function and method
I am unable to pinpoint the difference between two of them with complete clarity.
Especially, I am unable to see scrypto code and point out that which one is a function
and which one is a method
.
I read that a method causes change in state where as a function does not.
What is a state
?
What does it change in state
exactly mean ?
e.g. If I have to just make some changes to a nfs's metadata etc, should that be categorised as a function or a method ? (I think method)
A guideline about distinguishing a code tasks as a function or a method will help me a lot.
I am a beginner in DeFi and blockchain technology, any explanation of above with an real life example for identifying change vs no change in state
or code snippet will help me a lot.