On the other hand, if the type is an abstract type with a single abstract method (commonly referred to as a SAM type) or all abstract methods it has share the same overloaded name), then instead of an object, you can just pass a function, so the above example can become even more simplified to:SAM