create functions on the fly for working with units

* rather than manually creating functions for meters, feet, etc.,
  create machinary that can  create conversion functions on the fly
* have forEach use nested scope for pattern matching, rather than parent scope