use `unionA` instead of `(++)` and reorder functions
add pair mapping function
add `runLocal` for new scopes
implement most of symbol tables