It's a bit more complicated than that, since this makes expressing "return both deleted and non-deleted elements" difficult to express generically.
Might be better to support this via special field in the method signature, which adds the key in the method implicitly.
It's a bit more complicated than that, since this makes expressing "return both deleted and non-deleted elements" difficult to express generically.
Might be better to support this via special field in the method signature, which adds the key in the method implicitly.