rtz121
Joined 5 years ago
Karma
63
Submissions
54
Member since
May 9
Joined 5 years ago
I have bad news for you
The pains of not having multiple dispatch.
You can by overriding the method on apple or banana. If your method is on some other object, then yes, you cannot do this unless your programming language supports multiple dispatch.