implemented visit for ConstListNode() in a better way