FAQ Database Discussion Community


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

prolog,prolog-assert
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.

Unable to create Fact in Jekejeke Prolog

prolog,iso-prolog,prolog-assert,jekejeke
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...