Let's say that I created a function that accepts a key path of type KeyPath<Element, Value> as its parameter. Now I would like to convert it to a key path of type KeyPath<(offset: Int, element: Element), Value> that is required by another function that I'm going to call. Is it possible to achieve something like this?
Example code:
func my<Element, Value>(keyPath: KeyPath<Element, Value>) {
other(keyPath: /* Something here to get proper keyPath */)
}
func other<Element, Value>(keyPath: KeyPath<(offset: Int, element: Element), Value> ) {}