docs: add watchdocs target, stub pages for fibers/lists/maps, fix class example, and move build output to build/docs

This commit is contained in:
Bob Nystrom
2014-01-30 14:51:52 +00:00
parent ea2ec33ce0
commit 1464007327
10 changed files with 32 additions and 15 deletions
+4 -3
View File
@@ -28,9 +28,10 @@ To make our unicorn do stuff, we need to give it methods.
This defines a `prance` method that takes no arguments. To support parameters, add a parenthesized parameter list after the method's name:
:::dart
// Inside class...
prance(where, when) {
IO.print("The unicorn prances in " + where + " at " + when)
class Unicorn {
prance(where, when) {
IO.print("The unicorn prances in " + where + " at " + when)
}
}
Unlike most other dynamically-typed languages, in Wren you can have multiple methods in a class with the same name, as long as they take a different number of parameters. In other words, you can overload by arity. So this class is fine: