Lambdas vs. Procs


#1

I didn't get it; what's the deference exactly?


#2

The difference is that the proc victor will not return to the method batman_ironman_proc. It will only return "Batman will win!" and that's it.

Whereas the lambda victor will return "Batman will win!", but will then return to the batman_ironman_lambda method , which will then return "Iron Man will win!", so that's what will be taken as the return for the method.

If you want to really see which strings are being used and when, you should try adding a word to some of them.

For example add "again" to the batman_ironman_lambda strings, so that you can see which are being printed.