= Function Literal / Anonymous Function = ''Part of'' FunctionLiteralsCategory == Description == Function Literals enable embedding anonymous functions directly into expressions. == Example == {{{ #!d import std.stdio; int function(char c) fp; void main() { fp = function int(char c) { return 6; }; //note the semi-colon at the end writefln(fp('A')); // Prints 6 } }}} == More Information == For more details, see the [http://www.digitalmars.com/d/expression.html#FunctionLiteral D Specification]. == Source == Based on http://www.prowiki.org/wiki4d/wiki.cgi?DWiki/FunctionLiterals which was copied from http://dlanguage.netunify.com/11 (dead link).