small fixes

allow for nicer use in for-comprehensions for `foreach` and `filter`
operators. Some test added on filter followed by foreach