tests for CCList; made some functions tailrec