Skip to content

Instantly share code, notes, and snippets.

@rndme
Last active February 24, 2016 01:17
Show Gist options
  • Save rndme/701578a0f50619d9ad24 to your computer and use it in GitHub Desktop.
Save rndme/701578a0f50619d9ad24 to your computer and use it in GitHub Desktop.
//enough parens here to compile lisp apps...
var x= Object.freeze(((val)=>({
get: ( )=> val,
set: (v)=> val=v,
}))(123));
x.get(); // 123
x.set(321); // 321
x.get(); // 321
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment