Swift: How can I use mutual dependencies, forward declarations?

Function A() calles function B() and function B() calls function A().

Some uses forward declarations like Pascal.

Swift needs to have those in the same line.

// -- Swift: get around mutual dependencies: Put code in the same line. Strange notation.

doMain(); func doMain()
{
    println("Hello from doMain!")
}

 

Swift: How can I use mutual dependencies, forward declarations?

Helpful?

Leave a Reply

Your email address will not be published. Required fields are marked *