public static function alternator() {
        // the args are the values to alternate
        $args = func_get_args();

        return function ($next = true) use ($args) {
            static $i = 0;
            return $args[($next ? $i++ : $i) % count($args)];
        };
    }