Question: I am trying to create a view with multiple UIButtons where any tap would be registered as a tap on the nearest UIButton. I have been unsuccessful so far, and I am hoping you guys/gals have some knowledge on standard approaches/methods used to do what I am trying to do.

Answer: 
```
scala> case class Foo(i: Int, c: Char)
defined class Foo

scala> val f = Foo.apply _
f: (Int, Char) => Foo = <function2>

scala> (l1, l2).zipped map f
res12: List[Foo] = List(Foo(1,a), Foo(2,b), Foo(3,c))

```

More info, since someone didn't get what I meant, here's what this map looks like:

<https://github.com/scala/scala/blob/2.11.x/src/library/scala/runtime/Tuple2Zipped.scala#L35>
If you want a self made implementation for your problem, you can do something similar to what I did below. (wasted my time with)

There is already one implemented method to do that, which is described in @som-snytt 's answer.

An example implementation for your problem, which does not create intermediate tuples.

```
def createObjects[A,B,C](func: (A,B) => C)(l1: List[A], l2: List[B]) = {
  val resultBuffer = new ListBuffer[C]
  @tailrec
  def loop(l1: List[A], l2: List[B]): Unit = l1 match {
    case head :: tail if l2.headOption.isDefined => {
      resultBuffer += func(l1.head, l2.head)
      loop(l1.tail, l2.tail)
    }
    case Nil =>
  }

  loop(l1, l2)
  resultBuffer.result
}

```

You can then use it like this:

```
createObjects(MyObject)(l1, l2)

```

`createObjects(MyObject)(l1, l2)` only works if `MyObject` is a case class or has an apply method.

In the other case you can do one of the following:

```
createObjects[Int, Char, MyObject](new MyObject(_,_))(l1, l2)
createObjects((i: Int, c: Char) => new MyObject(i,c))(l1, l2)

```