I know I can do X is random(10).
to get a random number from 0 to 10, but is there a similar command to get a random matching item?
相关问题
- Creating a SPARQL parameterized query using append
- Creating a SPARQL parameterized query using append
- Unity - Get Random Color at Spawning
- How to generate a random number, then display it o
- how to randomly loop over an array (shuffle) in ba
相关文章
- What are the problems associated to Best First Sea
- How can I fix this circular predicate in Prolog?
- why 48 bit seed in util Random class?
- Need help generating discrete random numbers from
- How to negate in Prolog
- Get random records with Doctrine
- Looking for a fast hash-function
- Remove incorrect subsequent solutions without once
SWI-Prolog v6 has
random_member/2
defined like this:Usage example:
You probably want to use it in the
(-,+)
mode though.You can implement it. Here is a version:
From http://ozone.wordpress.com/2006/02/22/little-prolog-challenge/