Artsicle/Blog — pull request #4 by pathouse (2014-06-21 02:29:37+00:00)
Title: Interface demonstration

the first commit, demonstrates a very simple helper implementation.

the second commit demonstrates how to use interfaces to allow functions to act on multiple types of objects.

you can think of an interface like a contract - the function guarantees it will only use the methods defined in the interface, and the types that implement the interface guarantee those functions are defined and return the expected values.