Finally got anonymous functions working