documentation waypoint

This commit is contained in:
Jeremy Ashkenas
2009-12-21 11:41:45 -05:00
parent dcc70e5ab0
commit c7fa9c320a
42 changed files with 1026 additions and 53 deletions

21
documentation/cs/super.cs Normal file
View File

@@ -0,0 +1,21 @@
Animal: => .
Animal.prototype.move: meters =>
alert(this.name + " moved " + meters + "m.").
Snake: name => this.name: name.
Snake extends new Animal()
Snake.prototype.move: =>
alert("Slithering...")
super(5).
Horse: name => this.name: name.
Horse extends new Animal()
Horse.prototype.move: =>
alert("Galloping...")
super(45).
sam: new Snake("Sammy the Python")
tom: new Horse("Tommy the Palomino")
sam.move()
tom.move()