Only change is that you have to tell the compiler that 'undef-fn' exists but you don't have to provide an implementation. So, before all of that just do
(def undef-fn)
It should work after that. (def undef-fn)
It should work after that.Evalutating this in CL (SBCL)
(undef-fn)
gives: Restarts:
0: [CONTINUE] Retry calling UNDEF-FN.
1: [USE-VALUE] Call specified function.
2: [RETURN-VALUE] Return specified values.
3: [RETURN-NOTHING] Return zero values.
4: [RETRY] Retry SLY interactive evaluation request.
5: [\*ABORT] Return to SLY's top level.
6: [ABORT] abort thread (#<THREAD "slynk-worker" RUNNING {100288C7E3}>)
[... as well as a clipped stack trace ...]
Pressing 1 will allow you to name an alternative function in a minibuffer prompt, 2 lets you set the return value of the undefined fn, etc.