The following expression should work (you need to add parentheses around and after the anonymous function):

  ('A', 'B', 'C') => (function( $sequence) { count( $sequence)})()



On Thu, Sep 11, 2014 at 3:25 PM, Rob Stapper <r.stapper@lijbrandt.nl> wrote:

Hi,

 

I was playing with the arrow-operator and found that it doesn’t work on anonymous functions, see example.

 

('A', 'B', 'C') => function( $sequence) { count( $sequence)}

 

No idea why you should use a construction like this but I, kind of, expected it to work.

 

Maybe something for a next release( together with the “apply-function”;-).

 

Regards,

 

Rob Stapper




Dit e-mailbericht bevat geen virussen en malware omdat avast! Antivirus actief is.