Syntax of lambda

A <#66059#><#32225#>lambda<#32225#>-expression<#66059#> is just a new form of expression:

#tabular32227#

Its distinguishing characteristic is the keyword <#32236#>lambda<#32236#>. It is followed by a sequence of variables, enclosed in <#66065#><#32237#>(<#32237#><#66065#> and <#66066#><#32238#>)<#32238#><#66066#>. The last component is an expression. Here are three useful examples:

  1. <#66067#><#32240#>(lambda<#32240#>\ <#32241#>(x<#32241#>\ <#32242#>c)<#32242#>\ <#32243#>(;SPMgt;<#32243#>\ <#32244#>(*<#32244#>\ <#32245#>x<#32245#>\ <#32246#>x)<#32246#>\ <#32247#>c))<#32247#><#66067#>
  2. <#66068#><#32248#>(lambda<#32248#>\ <#32249#>(ir<#32249#>\ <#32250#>p)<#32250#>\ <#32251#>(;SPMlt;<#32251#>\ <#32252#>(ir-price<#32252#>\ <#32253#>ir)<#32253#>\ <#32254#>p))<#32254#><#66068#>
  3. <#66069#><#32255#>(lambda<#32255#>\ <#32256#>(ir<#32256#>\ <#32257#>p)<#32257#>\ <#32258#>(symbol=?<#32258#>\ <#32259#>(ir-name<#32259#>\ <#32260#>ir)<#32260#>\ <#32261#>p))<#32261#><#66069#>
They correspond to <#66070#><#32263#>squared?<#32263#><#66070#>, <#66071#>#tex2html_wrap_inline73578#<#66071#>, and <#66072#><#32265#>eq-ir?<#32265#><#66072#>, respectively, the three motivating examples discussed above. A <#66073#><#32266#>lambda<#32266#>-expression<#66073#> defines an anonymous function, that is, a function without a name. The sequence of variables behind <#32267#>lambda<#32267#> are the function's parameters; the third component is the function's body.