Is there any way to capture variable from outer scope like python and some other language.
If it is possible can you share code snippet and explain it.