# Is there a PartDelete like there is a TakeDrop

TakeDrop is nice because after taking a subarray, it also returns the remaining subarray. But it is limited in that the part specification can only be ranges, and not specific elements.

For example, TakeDrop[{a, b, c, d}, {1, 3}] yields {{a, b, c}, {d}}, but it is not possible to do something like TakeDrop[{a, b, c, d}, {{1}, {3}}] to get {{a, c}, {b, d}}.

The obvious needed generalization would be named something like PartDelete, but I cannot find it. Is there such a function?

• Like Through[{Extract, Delete}[{a, b, c, d}, {{1}, {3}}]]? I don't think there's a built-in, but as you can see it's not too hard to do. (FWIW, I still do Through[{Take, Drop}[(* stuff *)]] out of habit.) – J. M.'s technical difficulties Apr 9 '18 at 16:14

As J.M. mentioned in the comments, Through[{Extract, Delete}] does the job:
Through[{Extract, Delete}[{a, b, c, d}, {{1}, {3}}]]