"Curb" iteration of recorder

So I’ve come across this problem multiple times in my work flow other than trying to avoid it altogether I can’t find a solution:

While using the data recorder or a loop plugin to do some iterative work it recomputes the data flow every counter. how can I get it to recompute only when there is a change in value.

Example: I want the far right data recorder to only have one iteration of each number.

Old stuff here: https://www.grasshopper3d.com/forum/topics/update-data-only-when-needed see the attached script.
Code might be obsolete or cause some other problem: be careful.
(it should work by “passing” the number value to a panel just above the c#script)

You magnificent human, you. I’ll dive into it more at work tomorrow, but its so nice moving that slider without constant update.

Although I am a Python programmer, looking at your code and the comments David said on the subject. I think it might be possible (although slow) to maybe save the old data out to a temp file, then read it back to compare to the new data? When I have time ill look into this. I was trying to fumble around GH component level with data dams and logic bools but the data dams create a problem of themselves.

Data dam is not needed.
I did use that only to show when the data stream refresh.
For numeric values the c# component + a panel (just above it) should work just fine.