fixed anonymous function declaration

uses changed to use
Merge pull request #3523 from michalkleiner/patch-1

fixed anonymous function declaration