/** * Randomly re-order values. This operation does not preserve keys. * * Examples * * Crankshaft::Iter([1, 2, 3, 4])->shuffle()->to_array() * // => [3, 2, 1, 4] // or something entirely else * * Returns an Iterable. */ public function shuffle() { $values = $this->to_array(); shuffle($values); return Crankshaft::Iter($values); }