thatadamedwards
04/19/2018, 7:07 PMit("kotlin slack") {
val map = mutableMapOf("fruits" to mutableSetOf("apple", "banana", "orange", "cherry"))
fun putValueInAppropriateCategory(value: String, key: String, map: MutableMap<String, MutableSet<String>>) {
map[key]?.plus(mutableSetOf(value))
}
putValueInAppropriateCategory("strawberry", "fruits", map)
map["fruits"].should.contain("strawberry")
}