updated lval_print to handle user defined functions