I have an int variable called count_emails.
I wanted to use it as a counter by incrementing it in a foreach loop. I thought a simple example like this would be a good way to start with lambdas.
I tried both of the following, but the value of count_emails remains 1. - see screenshot 2
return $var.count_emails++;
return $var.count_emails = $var.count_emails + 1;
Screenshot 1 shows the code.
Is it possible to create a counter like this? Or have I got the wrong idea?
Screenshot 1
Screenshot 2