Go Functions With Methods
I was reading this article ’s section on “Function type as an interface” and thought this was a wild concept to see in any programming language. I created a different example here , that highlights the concept. Essentially, you create a type for a function signature, then add methods to that type. So a function….now has methods. Coming from any other language, this sounds absolutely insane. Hell even in go, this sounds insane when its first presented.
3 minutes to read
