Programming Erlang (2nd edition): Incorrect return value of send (184)

In the example on page 184, the return value of Pid ! {square, 12}. should be {square, 12} instead of {square, 144}.

1> Pid = spawn(area_server0, loop, []).
<0.36.0>
2> Pid ! {rectangle, 6, 10}.
Area of rectangle is 60
{rectangle,6,10}
3> Pid ! {square, 12}.
Area of square is 144
{square, 144}

Hello @swrenn,

Thanks for noting this issue. The author, Joe Armstrong, passed away in 2019. We sometimes do new editions with a new author, so I will keep your note on file in case that happens.

I didn’t know that. I figured he was still around. RIP.