On Mon, Nov 9, 2009 at 6:46 AM, dsimcha <dsim...@yahoo.com> wrote: > == Quote from Bill Baxter (wbax...@gmail.com)'s article >> I agree. Those numbers don't seem so bad, particularly if inlining is >> possible in the future. >> But there's still the issue of how to get both an enumeration and an >> unpacked tuple together. >> --bb > > Yeah, I thought about this, and I didn't have any good answer other than make > an > absurdly baroque enumerateUnpack function. I'd be open to suggestions here.
unpack2nd(enumerate(zip(foo,bar))) ? :-P or more seriously, you could have a flatten() type of HOF, which flattens any tuples at the top level. So (1, Tuple(a,Tuple(b,c))) becomes (1,a,Tuple(b,c)). --bb