I have a tuple and want to add an element without loosing type safety. This is what I want to achieve:
val tuple = ("", 1, 1f) // (String, Int, Float)
val newTuple:(String, Int, Float, Double) = tuple :+ 1d
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…