Out-of-order declarations

Root level declarations in Leaf have no order. This allows forward referencing of types, and variables, without any extra forward-declarations.

func pine = -> {
    //function defined later in the source file

//Note here we put the full function signature, the `pine` definition is using short-hand
func cone = ()->() {

//type defined later
var sample : branch 

type branch = [
    n : twig,
    q : integer

type twig = [
    x : integer

This rule applies across all of the source files of a module. How you split the files, and the order of the declarations does not change the result.