Top "Tuples" questions

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

Equivalent of Tuple (.NET 4) for .NET Framework 3.5

Is there a class existing in .NET Framework 3.5 that would be equivalent to the .NET 4 Tuple? I would like to …

c# .net-3.5 tuples
Swift: Multiple intervals in single switch-case using tuple

Have a code like: switch (indexPath.section, indexPath.row) { case (0, 1...5): println("in range") default: println("not at all") } The question …

ios swift switch-statement tuples xcode6
Counting the amount of occurrences in a list of tuples

I am fairly new to python, but I haven't been able to find a solution to my problem anywhere. I …

python list tuples counting
Remove duplicate tuples from a list if they are exactly the same including order of items

I know questions similar to this have been asked many, many times on Stack Overflow, but I need to remove …

python list duplicates tuples itertools
Why do we need tuples in Python (or any immutable data type)?

I've read several python tutorials (Dive Into Python, for one), and the language reference on Python.org - I don't …

python tuples
Is Using .NET 4.0 Tuples in my C# Code a Poor Design Decision?

With the addition of the Tuple class in .net 4, I have been trying to decide if using them in my …

c# .net tuples application-design
Haskell: how to map a tuple?

In Haskell, I can easily map a list: map (\x -> 2*x) [1,2] gives me [2,4]. Is there any "mapTuple" function …

haskell mapping tuples
Scala return type for tuple-functions

I want to make a scala function which returns a scala tuple. I can do a function like this: def …

function scala types return tuples
What does *tuple and **dict mean in Python?

As mentioned in PythonCookbook, * can be added before a tuple. What does * mean here? Chapter 1.18. Mapping Names to Sequence Elements: …

python python-3.x tuples namedtuple iterable-unpacking
Tuple Unpacking in Map Operations

I frequently find myself working with Lists, Seqs, and Iterators of Tuples and would like to do something like the …

scala map iterator tuples iterable-unpacking