Declare the return values from filter and map as mutable, since
ownership is being handed over to the caller.