[m-users.] primes...

Sean Charles (emacstheviking) objitsu at gmail.com
Mon Apr 4 06:05:03 AEST 2022


In the reference_manual there is reference to a predicate on page 22...

Threading the I/O state
main(!IO) :-
io.write_string("The 100th prime is ", !IO),
X = prime(100),
io.write_int(X, !IO),
io.nl(!IO)

Is this really a library function somewhere? I've not been able to track it down. It would be handy, today I decided to start the long climb that is Project Euler using Mercury, I've done the first two, but since found the ranges module, noted for future use.

Thanks
Sean

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20220403/65629b85/attachment.html>


More information about the users mailing list