public function withFilteredSteps(callable $matcher)
    {
        $clone = clone $this;

        foreach ($clone->stages as $stage => &$steps) {
            $steps = array_filter($steps, function ($step) use ($matcher, $stage) {
                return $matcher($stage, $step);
            });
        }

        return $clone;
    }