2010-10-28 17:02:00 -05:00
|
|
|
fn id[T](&T t) -> T {
|
2010-10-10 02:14:26 -05:00
|
|
|
ret t;
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2011-03-07 20:13:39 -06:00
|
|
|
auto t = tup(1,2,3,4,5,6,7);
|
2011-05-02 19:47:24 -05:00
|
|
|
assert (t._5 == 6);
|
2011-03-07 20:13:39 -06:00
|
|
|
auto f1 = bind id[tup(int,int,int,int,int,int,int)](_);
|
2011-05-02 19:47:24 -05:00
|
|
|
assert (f1(t)._5 == 6);
|
2010-10-28 17:02:00 -05:00
|
|
|
}
|