Question: In SwiftUI on MacOs, when implementing
`onDrop(of supportedTypes: [String], isTargeted: Binding<Bool>?, perform action: @escaping ([NSItemProvider]) -> Bool) -> some View`
we receive an array of NSItemProvider and this makes it possible to drop multiple items inside our view.

When implementing `onDrag(_ data: @escaping () -> NSItemProvider) -> some View` , how can we provide multiple items to drag?

I've not been able to find any examples online of multiple items drag and I'd like to know if there's another way to implement a drag operation that allows me to provide multiple NSItemProvider or the way to do it with the above method

My goal is to be able to select multiple items and drag them exactly how it happens in the Finder. In order to do that I want to provide an [URL] as [NItemProvider], but at the moment I can only provide one URL per drag Operation.

Answer: 
This can be a starting point

```cpp
template<typename F, typename ...FrontArgs>
struct bindfronthelper
{
    bindfronthelper(F f, FrontArgs&&...args)
        : mF{std::move(f)}
        , mFrontArg{std::forward<FrontArgs>(args)...}
    {}

    template<typename ...BackArgs>
    auto operator()(BackArgs&&...args) const
    {
        return std::apply(mF, std::tuple_cat(mFrontArg, std::forward_as_tuple(args...)));
    }

    F mF;
    std::tuple<std::decay_t<FrontArgs>...> mFrontArg;
};

template<typename F, typename ...FrontArgs>
auto mybindfront(F f, FrontArgs&&...args)
{
    return bindfronthelper<F, FrontArgs...>{std::move(f), std::forward<FrontArgs>(args)...};
}

```

<https://godbolt.org/z/Tz9fen>

Written quickly and not tested well, so there might be some pitfalls in corner cases. At least it shows how this can be achieved.

---

Ok I made this over complicated, here is simpler version:

```cpp
template<typename T, typename ...Args>
auto tuple_append(T&& t, Args&&...args)
{
    return std::tuple_cat(
        std::forward<T>(t),
        std::forward_as_tuple(args...)
    );
}

template<typename F, typename ...FrontArgs>
decltype(auto) mybindfront(F&& f, FrontArgs&&...frontArgs)
{
    return [f=std::forward<F>(f), 
            frontArgs = std::make_tuple(std::forward<FrontArgs>(frontArgs)...)]
            (auto&&...backArgs) 
        {
            return std::apply(
                f, 
                tuple_append(
                    frontArgs, 
                    std::forward<decltype(backArgs)>(backArgs)...)); 
        };
}

```

<https://godbolt.org/z/cqPjTY>

still passes all test I've provided. I'm keeping old version since with a bit of work it can be tweaked to work with older standard of c++.
One really simpel way I found is with lambda's (in this case capturing `this` - but you can change that easily to be generally adoptable):

```
auto bind_m = [this](auto mem_f) {
    auto wrapper = [=] (auto&&... args) {return std::mem_fn(mem_f)(this, std::forward<decltype(args)>(args)...);};
    return wrapper;
};

```

The lambda creates another lambda and returns it.