Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
eru
on Dec 8, 2014
|
parent
|
context
|
favorite
| on:
Reimplementing “git clone” in Haskell from the bot...
Haskell has sortBy and comparing, like this:
sortBy (comparing salary) employees
The grammar is not as close to English, but close enough to understand.
pdpi
on Dec 8, 2014
[–]
The canonical example there is actually to use on and infix `` notation:
sortBy (compare `on` salary) employeers
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: