function makeFunction()
{
   %value = 5;
   %func = function() { echo(%value); };
   return %func;
}

call(makeFunction());