Create a local int. Write a lambda expression which captures the int, and decrement it until it reaches 0. Once it is 0, stop decrementing; return true once 0 is reached.
i wrote the following lambda expression and i am capturing a1 by reference.however when i check the value of a1 it is still 3 even though i have captured it by reference ?