SHARE
TWEET

Untitled

a guest Aug 23rd, 2019 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function Env(obj){
  2.     var env = {}, outer = obj.outer || {};
  3.     if (obj.parms.length != 0){
  4.         for (var i = 0; i < obj.parms.length; i += 1)
  5.              env[obj.parms[i]] = obj.args[i];
  6.     }
  7.     env.find = function(variable){
  8.         if (variable in env)
  9.             return env;
  10.         else
  11.             return outer.find(variable);
  12.     };
  13.     return env;
  14. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top