Added switch

This is probably more for my own edification, but here's a naive implementation of `switch`.