An implementation of Generic Tree