move definition of 'defun' to methods_core