[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlaplus] How to remove an iterm from a Sequence?



You could write something like

SelectSeq(seq, LAMBDA x : x # item)

to obtain a sequence with all occurrences of `item' removed. However, it sounds a little strange to me that you model a queue where the order of elements matters while duplicates are eliminated. If the order is unimportant as well, it would be simpler to use a set.

Regards,
Stephan

On 26 May 2020, at 05:18, diaozengqi@xxxxxxxxxxx wrote:

Dear all,
I'm writing a TLA program to process a message queue whlle I must remove a duplicate item from the sequence when a new message is added to the message queue. How could I do this with TLA module? Or I must write a function to deal with it?
Thanks
Regards

Diao Zegnqi.

--
You received this message because you are subscribed to the Google Groups "tlaplus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tlaplus+unsubscribe@xxxxxxxxxxxxxxxx.
To view this discussion on the web visit https://groups.google.com/d/msgid/tlaplus/ddbdce3d-9339-44c2-98f3-58fbdf2b944c%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "tlaplus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tlaplus+unsubscribe@xxxxxxxxxxxxxxxx.
To view this discussion on the web visit https://groups.google.com/d/msgid/tlaplus/0921FB85-0048-4EC3-BF5E-2E2864A60142%40gmail.com.