Sure, it is easy. Sequences imply history. We create history explicitly just like RTL – by using clocked processes / flip-flops.
Once you have history, this is just a simple cross product of selected current values and two previous values.
WRT sampling, in OSVVM, we trigger on transaction completion using an explicit call to ICover.