43
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 03 Jan 2025
43 points (92.2% liked)
Programmer Humor
32707 readers
163 users here now
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
founded 5 years ago
MODERATORS
Can someone explain where the Y comes from? Is this something like, there exists a mother relation between this X and some Y?
mother can be used in several ways. If both X and Y variables are uninitialized, then it looks for all mother relationships. If one of them is initialized, it looks for matching relationships. If both are initialized, it returns true if such a relationship exists.
Yeah, the
Y
is a wildcard in that position. Typically, you would write it as an underscore, primarily because most Prolog compilers will warn about unknown variables, since those could also just be a typo of an existing variable.