3 ms·
What's going on in the second example? Did Prolog generate a list term stuffed with gensym variables, which satisifies the list_length being 3?
by kazinator 2y ago
What's going on in the second example? Did Prolog generate a list term stuffed with gensym variables, which satisifies the list_length being 3?
- derdi 2y agoIt generated a list stuffed with distinct logical variables. Any list of length 3 is unifiable with this list. Or in other words, this is the unique (up to variable renaming) most general list of length 3. Whether this is a "yes" to your question depends on what your mental model of "gensym variables" is. They are variables, not symbols (which Prolog would call atoms).