I am using this function
func countFrom(from:Int, #to:Int) -> () {
println("\(from)")
if from < to {
countFrom(from + 1, to: to)
}
}
countFrom(1, to: 10)
}
But on compiling i get Swift Compiler Error -
Command /Applications/Xcode6-Beta2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift failed with exit code 1
And if i removed "countFrom(from + 1, to: to)", then there is no more error. What's wrong with that?