Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
masklinn
on June 30, 2017
|
parent
|
context
|
favorite
| on:
Benefits of named return values in Go
Some HM language can infer types at the toplevel so you may not have an explicit signature at all, although that's generally frowned upon:
add1 = map (+1)
OTOH they also split the signature and function "header" so that you don't need to remove the "noise" to get the bare signature e.g.
add1 :: (Num a) => [a] -> [a] add1 = map (+1)
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: