Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
fao_
on Feb 5, 2016
|
parent
|
context
|
favorite
| on:
The Wrong Abstraction
> This is where you end up with functions that take 10 different option parameters, all of which activate a different code path.
Or you could abstract the commonalities out into a higher-order function.
jdmichal
on Feb 5, 2016
[–]
What is the higher order function for two disparate code paths, controlled by a parameter switch? `if`?
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
Or you could abstract the commonalities out into a higher-order function.