Implemented functions required for building CodeTree from a list of chars.