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

Simple! You just make f take in g's result type.


... not sure if serious or not



I'm completely serious in the sense that you could do that and really would in some situations.

You might do it because you want to factor the handling of the different result cases out to another function.


You don't think it would limit the independent use of f()?


No? Surely if f() takes a full result (including error condition) it's because there's something it wants to do with that?




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

Search: