![](https://secure.gravatar.com/avatar/8b5a3ee6fe397b9fd2f13c1ae4079f99.jpg?s=120&d=mm&r=g)
9 Jan
2022
9 Jan
'22
7:16 a.m.
Is there a way for a macro to check the previous value of #1, the last time that same macro was called? Here is a minimum working example, pretending that `\previousvalue` is equal to #1 from the last time the same macro was called: \define[1]\mymacro{ \if\previousvalue=#1 same as last time \else it is different from last time \fi } \starttext \mymacro{cat} \mymacro{cat} \mymacro{mouse} \mymacro{mouse} \mymacro{cat} \stoptext This would print: it is different from last time <--it was never called previously same as last time it is different from last time same as last time it is different from last time --Joel