import copy

class garnish_using:
    __slots__ = ("__decorate__", "use_args", "use_kwargs")
    def __init__(self, func, *args, **kwargs):
        self.use_args = args
        self.use_kwargs = kwargs
        self.__decorate__ = func
        
    def __call__(self, func):
        return self.__decorate__(func, *self.use_args, **self.use_kwargs)
    
    def __matmul__(self, func):
        return self(func)
    def __rmatmul__(self, func):
        return self(func)

class garnish:
    __slots__ = ("__decorate__")
    def __init__(self, func):
        self.__decorate__ = func
    
    def __call__(self, func):
        return self.__decorate__(func)
    
    def use(self, *args, **kwargs) -> garnish_using:
        return garnish_using(self.__decorate__, *args, **kwargs)
    
    def __matmul__(self, func):
        return self(func)
    def __rmatmul__(self, func):
        return self(func)

