doc e.g. for num_elements, simplified num_elements recursion