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

What I would do in these cases is to define the general computation function, but special-case it to return the hard-coded value for specific common inputs if it's being evaluated at compile time. Then add a test to verify both behaviors.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: