Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
blutoot
on June 3, 2014
|
parent
|
context
|
favorite
| on:
The Swift Programming Language
What is the advantage of "func funcName() -> returnType{ }" over "returnType funcName(){ }"?
kaonashi
on June 3, 2014
[–]
When your function returns a function, it's cleaner.
func funcName() -> Int -> String { return { (i: Int) -> String in return i.toString() } }
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: