Updating nested records in a single-line expression?

Rachwal Waldemar-AWR001 Waldemar.Rachwal@REDACTED
Thu Oct 7 21:22:56 CEST 2004


Hi!

Accessing data from nested records is fairly clear.
However, I experienced notational problems trying to update such records in
a single line expression.
Suppose we have a protocol where messages consist of elements which in turn
are collections of fields being simple values or form further nested
structures.
When I modify any nested field I have to get a modified copy of the message,
but how to get it in a single expression without additional variables?
Is it doable?
Or, maybe I have to deal with such messages in different way rather than
model as records and then access/update these records directly?

Thanks for any help,
Waldemar.



More information about the erlang-questions mailing list