Answered by the programmers of entr (< "A function can be exported to a subshell, but you cannot execute a function with an external program. If you want to execute shell functions, you can write a loop such as this:"
do_it(){ echo 'Eita!'; }
while true; do
ls folder1/* folder2/* | entr -pd -s 'kill $PPID'
do_it
done