Advertisement
snake5

SGScript - simplified closures

Aug 30th, 2013
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. x = 5;
  2.  
  3. y = function( a ) use( x )
  4. {
  5.     x += a;
  6. };
  7.  
  8. y( 4 );
  9. println( x );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement