protected static function unnest(NestableResult $struct) : Result
    {
        $result = $struct->outer();

        foreach ($struct as $key => $error) {
            if ($error instanceof NestableResult) {
                $error = self::unnest($error);
            }

            $result = $result->concat(
                $error->map(function ($e) use ($key) {
                    return $key . ': ' . $e;
                })
            );
        }

        return $result;
    }