The following function is meant to call an arbitrary function at each of the immediate children of an org heading:
(defun org-map-shallow-tree (funcarg)
""
(save-excursion
(org-back-to-heading)
(let* ((cur-level (car (org-heading-components))))
(org-map-tree (lambda () (when (equal (+ 1 cur-level) (car (org-heading-components)))
(funcall 'funcarg)))))))
The problem is that when I call it, as in:
(defun lol () (message "lol"))
(org-map-shallow-tree 'lol)
I get the following error:
Debugger entered--Lisp error: (void-function funcarg)