Created
December 21, 2011 05:11
-
-
Save tanabe/1504683 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Animal; | |
| class Human extends Animal; | |
| class Dog extends Animal; | |
| class Bird extends Animal; | |
| move = function(animal:Animal) { | |
| if (animal is Bird) { | |
| animal.fly(); | |
| } else { | |
| animal.move(); | |
| } | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment