I was thinking this would be handy a function that works like this
item.consecutive(#3)=FOO would evaluate to true if the last 3 values were all FOO
likewise item.consecutive(30) would check all consecutive values in the last 30 seconds.
This is sort of analgous but less verbose version of
( {item.last(#3)} = FOO ) &
( {item.last(#2)} = FOO ) &
( {item.last(#1)} = FOO )
item.consecutive(#3)=FOO would evaluate to true if the last 3 values were all FOO
likewise item.consecutive(30) would check all consecutive values in the last 30 seconds.
This is sort of analgous but less verbose version of
( {item.last(#3)} = FOO ) &
( {item.last(#2)} = FOO ) &
( {item.last(#1)} = FOO )
Comment