Reading a variable

var(V) lists the valid variable indices; lookup(A, V, B) reads variable V’s value out of an assignment: