No need to yield, as you're not returning anything. I would just do

```
elements.foreach { e =>
  // add to environment
}
```