although its possible, it can in some cases look l...
# tornadofx
t
although its possible, it can in some cases look less beautifull. The problem is that you need a common interface. This interface can be a class with a generic: Binding<T> or a generic itself R : Binding<T> In the case of the generic itself, you need three generics in the funciton, (the original type, the new type and the BindingType) I think making two functions will do, but I don't know if it's a smart idea... (of course, the compiler will do most of the generics-work, but if you need to fill in one of the generics, you need to fill in all.