Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> 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.



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: