Skip to content

Instantly share code, notes, and snippets.

@mcsee
Last active April 27, 2025 23:31
Show Gist options
  • Save mcsee/fc3d83aa6cf837463b5dae2137aa5881 to your computer and use it in GitHub Desktop.
Save mcsee/fc3d83aa6cf837463b5dae2137aa5881 to your computer and use it in GitHub Desktop.
This gist belongs to Clean Code Cookbook http://cleancodecookbook.com By Maximiliano Contieri http://maximilianocontieri.com
[](){}
/* This valid lambda function:
Captures no variables.
Takes no arguments.
Performs no actions.
[]: This is the capture clause.
It specifies which variables from the surrounding scope
are accessible inside the lambda function.
An empty capture clause [] means the lambda
*does not capture* any variables from the surrounding scope.
(): This is the parameter list.
It defines the arguments the lambda function accepts.
An empty () means the lambda takes *no parameters*.
{}: This is the function body.
It contains the code that the lambda executes when called.
An empty {} means the lambda has no operations
to perform—it does nothing.
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment