this post was submitted on 03 Jan 2025
41 points (91.8% liked)
Programmer Humor
34234 readers
40 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
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I'll admit I don't speak prolog but doesn't this definition lack a recursive case to ensure that the mother is either Eve or a descendent of Eve? And there should probably be a father case in there as well?
Depends on how you want to define your domain knowledge.
The thing you need to define for sure is the predicate
mother/2
(Which has arity 2, or in other words, two arguments). From then on, multiple options are available:mother(X, Y)
as an "axiom", and define mother terms for all elements:mother(X, Y)
fromfemale(X)
andparent(X, Y)
terms.parent/2
terms instead ofmother/2
andfather/2
.I never saw such a potent combination of gender politics and prolog