See also this reply: The Function Colour Myth (https://lukasa.co.uk/2016/07/The_Function_Colour_Myth/).
It is possible to work around the "color" by using generators [0], that way one algorithm can be used in synchronous and asynchronous way. Async await tightly bind to underlying Promises.
[0]: https://curiosity-driven.org/promises-and-generators#decoupl...