What is a neat way to hold pairs of rows that are not necessarily key (may have duplicate keys) for a small collection? The [List [String]] list works explicitly, but looks dirty.
GreetingsPars
Tuples are an ideal data structure for representing pairs.
So use a list of tuples (String, String) .
(String, String)
List[(String,String)] is the standard solution:
List[(String,String)]
scala> List(("foo","bar"), ("foo","baz")) res1: List[(java.lang.String, java.lang.String)] = List((foo,bar), (foo,baz))