Functions do not necessarily have to be created inside of classes in Boo.
This is valid code:
So is this:
Functions can also be placed inside other functions (these are called Closures or "blocks" in some languages).
Closures are also handy in a variety of other situations.
There are also 3 special functions that can be used in classes. They are constructor, static constructor, and destructor. Each have no return type, modifiers, or attributes. Only the plain constructor takes parameters. Constructors are invoked when an instance is created. Static constructors are called only the first time the type is used. They should be used to initialize uninitialized static fields. Destructors perform commands when objects are freed.


