Thanks for you help!! I found another way to do this.
Working with your example: val items = List(Item("Apple","Fruit", 1.50),Item("Pear", "Fruit", 2.00)) val itemsonsale = items.copy(price = 0.50)
I'm in the process of learning scala too
Regards!!
Thanks for you help!!
I found another way to do this.
Working with your example:
val items = List(Item("Apple","Fruit", 1.50),Item("Pear", "Fruit", 2.00))
val itemsonsale = items.copy(price = 0.50)
I'm in the process of learning scala too
Regards!!