Wiki

Changes between Version 1 and Version 2 of AnonMethod

Show
Ignore:
Timestamp:
11/22/10 18:38:15 (14 years ago)
Author:
todd.a
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AnonMethod

    v1 v2  
    1717Anonymous Method 
    1818{{{ 
     19#!cobra 
    1920do [as <Type>]        # no parameters 
    2021    <body statements...> 
     
    3031Lambdas 
    3132{{{ 
     33#!cobra 
    3234do = <expr>               # no parameters 
    3335do (<paramList>) = <expr>   # args passed as per invocation 
     
    3840Anonymous Method 
    3941{{{ 
     42#!cobra 
    4043sig ArithmeticOp(a as int, b as int) as int 
    4144sig SimpleMethod 
     
    7881Lambda 
    7982{{{ 
     83#!cobra 
    8084    t = [3, 2, 1] 
    8185    t.sort(do(a as int, b as int)=a.compareTo(b)) 
     
    9296e.g 
    9397{{{ 
     98#!cobra 
    9499class Test 
    95100