Simple Lambdas

Run Settings
LanguageC++
Language Version
Run Command
#include <stdio.h> int main() { int apple = 40; int pear = 3; // Expose only spesific locals to a scope. /*Type ThingName = */ [&pear /*Special Argument*/ ](/*Normal Type Argument*/) { pear = pear + 2; //apple = apple + 3; // Error printf("%i\n",pear); }(/*Normal Argument*/);//Runs inline. If it returns something, it returns like the function under. auto SomeFunction = [/*Special Argument*/](/*Normal Type Argument*/) { printf("eoke\n"); };//Returns a Function(or rather "some unspecified functor type"). The function itself returns the variable. SomeFunction(/*Normal Argument*/); printf("%i\n",pear); printf("%i\n",apple); return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines