FAQ Database Discussion Community

Unable to create Fact in Jekejeke Prolog

I'm using the Seven Languages In Seven Weeks Prolog tutorial and trying to run through some examples using the Android Jekejeke Runtime. For example, if I add likes(wallace, grommit). from the tutorial, I get. Error: Undefined, private or package local predicate likes/2 I tried using assert, as described in How...

How can I call a function random inside other function in prolog?

I'm trying to call the random function inside another function. For example I want to do this assert(fact(random()). But it does not work. How can I insert a random number this way? Thanks.