anonymous function parameter type inference for iterable parameters
rest of #1103