Add invoke(), for_each() and for_each_right()

This isn't quite right. The callback signature should be:

```
callback(key, value, item)
```

where `key` is either the `list` index or `dict` key.