Given a map where a digit is associated to several characters
scala> val conversion = Map(\"0\" -> List(\"A\", \"B\"), \"1\" -> List(\"C\", \"D\"))
I just did that as follows and it works
def cross(a:IndexedSeq[Tree], b:IndexedSeq[Tree]) = { a.map (p => b.map( o => (p,o))).flatten }
Don't see the $Tree type that am dealing it works for arbitrary collections too..