include/stack.h
tree_nd *stk_pop(stk_nd **head) // TODO: handle deep pop, that is, pop the stack nodes 
{                               // AND the formulas inside (trees)
    if(!head || !*head)
        return NULL;

    tree_nd *popped_val = (*head)->formula; 
    stk_nd *garbage = *head;
    *head = (*head)->next;
    free(garbage);
    
    return popped_val;
}
// pops from the stack and returns the popped formula
pops from the stack and returns the popped formula
pops from the stack and returns the popped formula
tree_nd *stk_pop(stk_nd **head) 
{                               
    if(!head || !*head)
        return NULL;
    tree_nd *popped_val = (*head)->formula; 
    stk_nd *garbage = *head;
    *head = (*head)->next;
    free(garbage);
    return popped_val;
}
tree_nd * stk_pop ( stk_nd * * head ) { if ( ! head || ! * head ) return NULL ; tree_nd * popped_val = ( * head ) -> formula ; stk_nd * garbage = * head ; * head = ( * head ) -> next ; free ( garbage ) ; return popped_val ; }
pops from the stack and returns the popped formula
pops from the stack and returns the popped formula
// TODO: handle deep pop, that is, pop the stack nodes  // AND the formulas inside (trees)