Click the green flag to see the example. To use it in your own project, make a 'pairs' list and a 'return stack' list, and a nil variable, then copy the necessary blocks. Be sure to use the 'delete all pairs!' block before using the other blocks, or at least set the first item of the pairs list to '' and nil to 1.
Update: Don't use this. Consider https://scratch.mit.edu/projects/120045269/ Here's a linked list implementation. It can store arbitrary values - including lists! Advantages: • Lists of lists (of lists of ...) • Can hold arbitrary values • You can use the pairs as two-tuples if you don't need a list Disadvantages: • Might get slow if you're using lots of lists. If you're not using any of the lists anymore, use the 'delete all pairs!' block.