I have arrived at a solution thanks to ElegantBeef and Vindaar! The core idea is that you can use the power of pragmas/macros to rewrite a function definition so that it is instead an anonymous proc assigned to a mutable variable!
What this allows you is then to simply reassign the proc in the mutable variable with your mock-proc and you're good to go! I'm currently in the process of putting that idea into its own package with utils that take care of various things surrounding that: <https://github.com/PhilippMDoerner/mockingbird>
