

This is a general property of predicates that depend on the standard of terms which defines the order of all terms, including variables. Here is another nice one:
?- sort([X,2], [3,2]). X = 3.
Also added comment on SO.
Did you know ... | Search Documentation: |
![]() | Predicate min_member/2 |
This is a general property of predicates that depend on the standard of terms which defines the order of all terms, including variables. Here is another nice one:
?- sort([X,2], [3,2]). X = 3.
Also added comment on SO.
The documentation should probably change from "True when Min is the smallest member..." to "True when Min can be unified with the smallest member...".
?- min_member(3, [1,2,X]). X = 3.
Or document this behavior explicitly?
See here for a discussion on SO.