<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">In the reference_manual there is reference to a predicate on page 22...<div class=""><br class=""></div><div class="">Threading the I/O state<br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class="">main(!IO) :-</div><div class="">io.write_string("The 100th prime is ", !IO),</div><div class="">X = <b class="">prime</b>(100),</div><div class="">io.write_int(X, !IO),</div><div class=""><a href="http://io.nl" class="">io.nl</a>(!IO)</div></blockquote><div class=""><br class=""></div><div class="">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.</div><div class=""><br class=""></div><div class="">Thanks</div><div class="">Sean</div><div class=""><br class=""></div></body></html>