A dispatch table is a data structure that associates an index value to an action. It's a rather elegant replacement for a switch-type statement. Most languages have support for dispatch tables, but the support ranges from do-it-yourself to built-in and hidden under a layer of syntax. How does your favorite language implement dispatch tables?
I had considered using the example from the Wikipedia page, but it's a bit contrived without being clean. Instead, I recommend implementing a dispatch table to play Rock Paper Scissors. First create a data structure that stores actions that print a rock, paper or scissors. Then demonstrate how to use the structure by making a throw or two. I will post an answer in Lua for the sake of example.
Bonus: One of great things about a dispatch table is that actions may be added dynamically. There are numerous expansions of the basic RPS game, including dynamite, which I remember from childhood. (Dynamite blows up rock and scissors cut wick. In our games dynamite blew up paper too.) How do you extend a dispatch table in your language?