books/bookvol9 simplify logic in compDefineCapsuleFunction