I'm not sure whether this is technically possible and whether there are things I did not think of before writing this down. I would love to get this into an RFC, if you people here think it would be worth it. Let me know what you think and/or where I'm wrong with what I've written down!
Yes, I just saw that option in a stackoverflow post. The thing is that this is not nice from an API-design standpoint. If you occasionally have to call your API functions outside of a chain (like the ones I have in my blogpost), you have to write foo((1, 2)) ... which is not nice. And if there is no technical point why this cannot be implemented, we get awesome API-design possibilities "for free".
The "it's the same syntax to call with tuple or not" is a bit scary, though, once type inference gets involved, so I think I prefer the explicit way--perhaps a function adapter that takes something with multiple arguments and returns a function that takes a tuple.
Personally I’d be against this type of thing for Rust . There’s no real need to be clever in places like this and as you say, there are ways to stay explicit but convenience things up a bit.
Having this tuple application done automatically and silently is a bad idea. Implicit things that make a language act like that usually bite your ass later. And this pain has happened in other languages.
On the other hand Python uses an application (apply in Lisp lingo) syntax that is both simple, short and explicit:
def foo(a, b):
print(a)
ab = (1, 2)
foo(*ab)
You can't use a star like that in Rust, but other short syntaxes could be invented.
In D language there are both struct-like library-defined tuples as in Rust, and built-in "type tuples" that can contain argument packs like that. They have a differerent ABI, the type tuples are designed to have the same memory layout as function calls, so they are efficient if you want to apply a tuple as discussed here. In Rust I think such efficiency is missing (if the function is not inlined).
let x = (3,);
f(x); // does this call f(3) or f((3,))?
// does it depend on f? What if f is generic?
What is a tuple?
In your example, you have a function and_then_chain turn a T into a (T, U), then into a (T, U, V).
But what if T is statically known to be (A, B)? Is it impossible to make this produce ((A, B), U, V)? If so, it reminds me of perl's eternally-flat array data type...