Top "Tuples" questions

In programming, tuples are simple *product types*, representing ordered collections of types.

Scala: How to convert tuple elements to lists

Suppose I have the following list of tuples: val tuples = listOfStrings.map(string => { val split = string.split(":") (split(0), split(1), …

scala tuples higher-order-functions
Is it possible to have tuple assignment to variables in Scala?

Possible Duplicate: Tuple parameter declaration and assignment oddity In Scala, one can do multiple-variable assignment to tuples via: val (a, …

scala variable-assignment tuples
In C# 7 is it possible to deconstruct tuples as method arguments

For example I have private void test(Action<ValueTuple<string, int>> fn) { fn(("hello", 10)); } test(t =&…

tuples c#-7.0
TypeError: <lambda>() missing 1 required positional argument: 'w'

Code is here return self.activator(reduce(lambda a, b: a+b, map(lambda x, w: x*w, zip(input_…

python python-3.x lambda tuples iterable-unpacking
Subclassing tuple with multiple __init__ arguments

The following code works: class Foo(tuple): def __init__(self, b): super(Foo, self).__init__(tuple(b)) if __name__ == '__…

python inheritance subclass tuples
Efficiently construct Pandas DataFrame from large list of tuples/rows

I've inherited a data file saved in the Stata .dta format. I can load it in with scikits.statsmodels genfromdta() …

python tuples pandas dta
Interface for associative object array in TypeScript

I have an object like so: var obj = { key1: "apple", key2: true, key3: 123, . . . key{n}: ... } So obj can contain any …

typescript tuples associative-array unions
In Scala, is there a way to take convert two lists into a Map?

I have a two lists, a List[A] and a List[B]. What I want is a Map[A,B] …

list scala map scala-2.8 tuples
C#7 tuple & async

Old format: private async Task<Tuple<SomeArray[], AnotherArray[], decimal>> GetInvoiceDetailAsync(InvoiceHead invoiceHead) { ... } How can you do …

c# tuples c#-7.0
"using" function

I've defined 'using' function as following: def using[A, B <: {def close(): Unit}] (closeable: B) (f: B => A): …

scala using tuples