putting lambdas in dictionaries and arrays