Add comments and reorganize the code.
Add acons.
Add a test for recursion
Add a missing return statement.

The previous code happened to work on x86-64 because the return value of
handle_function() happened to be treated as the return value of prim_lambda().
Neither GCC nor the C spec don't guarantee this behavior.