How to return a Range of Int in Swift? -


how can return range of int function in swift? i've searched swift 2.1 docs, web, so, , tried:

func myfunc() -> range { // } func myfunc() -> ( int ... int ) { // } func myfunc() -> range< int >  { // } 

... , many others ...

sorry being bone-headed here, , in advance!

your third 1 correct. compiles , works, example:

func oneto10() -> range<int> {     return 1...10  }   

Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -