Guest User

Untitled

a guest
May 26th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. (function () {
  2. var __scope_0 = Array(3);
  3.  
  4. var __scope_1 = function (__selector) {
  5. var __captured;
  6. switch (__selector) {
  7. case 0:
  8. __captured = ["red"];
  9. break;
  10. case 1:
  11. __captured = ["green"];
  12. break;
  13. case 2:
  14. __captured = ["blue"];
  15. break;
  16. default:
  17. throw new Error("Unknown scope selector");
  18. }
  19.  
  20. __scope_0[__selector] = __captured;
  21. return __captured;
  22. };
  23.  
  24. var $_0 = function (__scope_2) {
  25. var __captured__scope_2 = __scope_0[__scope_2] || __scope_1(__scope_2);
  26. return __captured__scope_2[0];
  27. };
  28.  
  29. var $_1 = function (__scope_2, newColor) {
  30. var __captured__scope_2 = __scope_0[__scope_2] || __scope_1(__scope_2);
  31. __captured__scope_2[0] = newColor;
  32. };
  33.  
  34. var _2 = $_0.bind(null, 0);
  35. var _4 = $_1.bind(null, 0);
  36. var _6 = $_0.bind(null, 1);
  37. var _8 = $_1.bind(null, 1);
  38. var _A = $_0.bind(null, 2);
  39. var _C = $_1.bind(null, 2);
  40.  
  41. cars = [{
  42. getColor: _2,
  43. paint: _4
  44. }, {
  45. getColor: _6,
  46. paint: _8
  47. }, {
  48. getColor: _A,
  49. paint: _C
  50. }];
  51. })();
Add Comment
Please, Sign In to add comment