The syntax of Prolog is important! Since Prolog programs are just Prolog data structures, it is easy to write Prolog meta-interpreters which generate or consume Prolog code.
https://www.youtube.com/watch?v=nmBkU-l1zyc