a
and b
are values of Iterator[String]
type. I need c
to include all the elements of a
and b
. Surprisingly I can't figure out how to achieve this. May you happen to know?
++
operator will do that work.
An example:
scala> val a = "abcd".combinations(2)
//a: Iterator[String] = non-empty iterator
scala> val b = "efg".combinations(2)
//b: Iterator[String] = non-empty iterator
scala> val c = a++b
//c: Iterator[String] = non-empty iterator
scala> c.toList
//res0: List[String] = List(ab, ac, ad, bc, bd, cd, ef, eg, fg)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With