6/simp.c
/* Takes a tuple and binds the i'th element of it to the
 * i'th name on the rhs of the assignment. */
Takes a tuple and binds the i'th element of it to the
i'th name on the rhs of the assignment.
Takes a tuple and binds the i ' th element of it to the i ' th name on the rhs of the assignment .
static Node *destructure(Simp *s, Node *lhs, Node *rhs)
{
    Node *lv, *rv, **args;
    size_t i;
    args = lhs->expr.args;
    rhs = rval(s, rhs, NULL);
    for (i = 0; i < lhs->expr.nargs; i++) {
        lv = lval(s, args[i]);
        rv = tupget(s, rhs, i, lv);
        assert(rv == lv);
    }
    return NULL;
}
static Node * destructure ( Simp * s , Node * lhs , Node * rhs ) { Node * lv , * rv , * * args ; size_t i ; args = lhs -> expr . args ; rhs = rval ( s , rhs , NULL ) ; for ( i = 0 ; i < lhs -> expr . nargs ; i ++ ) { lv = lval ( s , args [ i ] ) ; rv = tupget ( s , rhs , i , lv ) ; assert ( rv == lv ) ; } return NULL ; }
Takes a tuple and binds the i'th element of it to the
 i'th name on the rhs of the assignment.
Takes a tuple and binds the i ' th element of it to the i ' th name on the rhs of the assignment .