Generic-user-small Dave Peticolas 2 posts

Thank you for writing Programming Erlang. It is excellent and I enjoyed it immensely.

One thing is driving me nuts: the area_server implementation used as part of the OTP
example is supposed to have a bug in it, relating to getting the area of a rectangle.

But I can’t find it, and when I downloaded the code and tried it out, it seemed to
actually work. Did it get “fixed” during publication?

thanks,
dave

 
3_small_small Joe Armstrong 5 posts

You’re right – I’m an idiot. I’m the nitwit who “fixed” it. Silly me.

The last clause of compute_area/1 in area_server.erl should be:

compute_area({rectonge, X, Y}) -> X * Y.

Glad you’re enjoying the book.

Cheers

/Joe Armstrong

 
Generic-user-small Dave Peticolas 2 posts

Ah, thank goodness, I am not losing my mind :)

3 posts, 2 voices