--- stack/stack.c 2002/02/05 12:33:21 1.30 +++ stack/stack.c 2002/02/05 22:25:04 1.31 @@ -348,6 +348,23 @@ return out_item; } +extern void rcl(environment *env) +{ + value *val; + + if(env->head == NULL) { + printerr("Stack empty"); + return; + } + + if(env->head->item->type!=symb) { + printerr("Not a symbol"); + return; + } + val=((symbol *)(env->head->item->content.ptr))->val; + toss(env); /* toss the symbol */ + push_val(&(env->head), val); /* Return its bound value */ +} /* If the top element is a symbol, determine if it's bound to a function value, and if it is, toss the symbol and execute the