Is the callbacks example correct in "Q for Mortals"?

Trying this example:
https://code.kx.com/q4m3/1_Q_Shock_and_Awe/#120-example-asynchronous-callbacks
On server:

rsvp:{[arg;cb] show arg; (neg .z.w) (cb; 43); show `done;}

On client:

(neg h) (`rsvp; 42; `echo)

The server displays 42 as advertised, but the client responds with 'echo, no 43 shows up.

Anything wrong with the example? Any way to fix it?

Dmitri,

You are seeing this error because you did not define the “echo” function on the client side.

We turn to the client side and create echo to serve as the function called back for this demonstration.

q)echo:{show x} / on client

q)h:hopen 10223q)neg[h] (rsvp;42;echo)q)'echoq)echo:{show x} / on clientq)neg[h] (rsvp;42;echo)q)43

Regards,
Jorge

Thank you for the catch, Jorge!

The same section defines `echo also on the server,

it would have been less confusing to have a different name.

How comes, no error was reported when `echo is not defined?