Prolog does not have functions. It has functors/predicates.
I know.
I was talking about functions in the source language of the hypothetical compiler. The Prolog -style logic programs would be an internal data structure of that compiler.
It's easy to get confused when talking about compilers and interpreters because the source, target and host language concepts can get mixed up. Adding one or more intermediate languages to the mix doesn't help either. Either I was unclear or you didn't read my comment carefully enough :)
Comments
minor nitpick:
Prolog does not have functions. It has functors/predicates.
Unlike functions there is no distinct set of inputs and outputs. In prolog you can solve car(Foo,Bar):-some_rule. for Foo or Bar.
I know.
I was talking about functions in the source language of the hypothetical compiler. The Prolog -style logic programs would be an internal data structure of that compiler.
It's easy to get confused when talking about compilers and interpreters because the source, target and host language concepts can get mixed up. Adding one or more intermediate languages to the mix doesn't help either. Either I was unclear or you didn't read my comment carefully enough :)