Hacker News new | ask | show | jobs
by Leftium 1056 days ago
Remember you can mix FP with other paradigms.

For example, feel free to use mutation if it's limited to the implementation of a small function. The function will still be effectively pure (to callers of the function).

Or when implementing "functional core, imperative shell," Gary Bernhardt says he tends to start with imperative code in the shell, then refactor it into the functional core[1].

[1]: https://hw.leftium.com/#/item/34866473