Added a function to perform normal-order beta-reduction