A couple nice references on the visitor pattern:
The code in this Gist implements a simple visitor using nonsensical, but reasonably clear, types.
We have a set of primitive-alikes upon which we would like to perform various operations. We use a visitor to implement the "biggify" operation.