[mercury-users] Re: can one_solution/2 and unsorted_solutions/2 be det?
Bart Demoen
bmd at cs.kuleuven.ac.be
Wed Oct 29 00:28:44 AEDT 1997
> What is the declarative semantics of `random(N)'?
I don't know why I am answering this, because you know this: I learned
it in this Mercury list, maybe even from you
the random/1 I meant is really a random/3: it has a hidden couple of
arguments, representing the info needed to compute the next random
number - initial input = seed - and blablabla
is that enough ?
why is my random not pure ?
the findall/3 I wrote in my Prolog code is to be replaced with
whatever you want in Mercury that produces a complete list of all
solutions
now, why is my definition of once/1 with the hidden arguments for
random not pure ? (modulo trivial rewrite in Mercury)
Bart
More information about the users
mailing list