How do I implement a custom theme function?
From the description of valid parameters in the docs:


  function: (deprecated in Drupal 8.0.x, will be removed in Drupal 9.0.x) If specified, this will be the function name to invoke for this implementation. If neither 'template' nor 'function' are specified, a default template name will be assumed. See above for more details.


So if you must use a function, you need to be explicit:

function example_theme($existing, $type, $theme, $path) {
   return array(
    'example' =&gt; array(
      'variables' =&gt; array('items' =&gt; array()),
      'function' =&gt; 'theme_example',
    ),
  );
}


But considering that method is deprecated in favour of template files, it would be better to use one. You can do so by simply creating a template file at modules/custom/example/templates/example.html.twig