public static same_func <R> bind <R, P1, T1>(func_res <R, P1> handler, T1 p1) { return(delegate(object[] args) { return handler((P1)(functional._ == (object)p1 ? args[0] : p1)); }); }
public static same_func <R> bind <R, P1, P2, T1, T2>(func_res <R, P1, P2> handler, T1 p1, T2 p2) { return(delegate(object[] args) { int i = 0; return handler((P1)(functional._ == (object)p1 ? args[i++] : p1), (P2)(functional._ == (object)p2 ? args[i++] : p2)); }); }
public static same_func <R> cast <R, T1>(func_res <R, T1> handler) { return((object[] args) => handler((T1)args[0])); }
public static same_func <R> cast <R, T1, T2, T3>(func_res <R, T1, T2, T3> handler) { return((object[] args) => handler((T1)args[0], (T2)args[1], (T3)args[2])); }
public static same_func <R> cast <R>(func_res <R> handler) { return((object[] args) => handler()); }