Or at least implement it in a way that doesn't destroy the input object.