It might be a good idea to add a syntax for applying a function to a record field. For example, this would increase the amount
field by 1:
{ record | amount <- (+) 1 }
Currently it would have to be done like this which is too repetitive:
{ record | amount = 1 + record.amount }
I’m not sure how often this would be useful. I have found 2 examples in the source code of my EditSC project where this would be useful. Currently they look similar to this:
{ model | someList = newItem :: model.someList }
{ model | someArray = Array.set index newValue model.someArray }
It could look like this instead:
{ model | someList <- (::) newItem }
{ model | someArray <- Array.set index newValue }