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

DI (generally) tends to point more towards constructing objects or systems. This would be a bit closer to a functional equivalent of the OO "template method" pattern: https://en.wikipedia.org/wiki/Template_method_pattern

You write a concrete set of steps, but delegate the execution of the steps to the caller by invoking the supplied functions at the desired time with the desired arguments.



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

Search: