<div dir="ltr">Thanks Mark. I've put a link a link to your email in my blog post on the subject (<a href="http://wombatlang.blogspot.com.au/2014/08/lazyness-backtracking-and-explicit-io.html">http://wombatlang.blogspot.com.au/2014/08/lazyness-backtracking-and-explicit-io.html</a>). Mistakes in my post will be quickly fixed. I look forward to understanding it all better one day!<div>
<br></div><div>rks</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Aug 30, 2014 at 5:39 PM, Julien Fischer <span dir="ltr"><<a href="mailto:jfischer@opturion.com" target="_blank">jfischer@opturion.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Hi Robert,<div class=""><br>
<br>
On Sat, 30 Aug 2014, Robert Smart wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I don't see print_cc/1.<br>
</blockquote>
<br></div>
It's in the io module; listed just after io.print.<div class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I assumed that print_cc("Rosetta\n") was a sort of partial application<br>
and that spawn would complete that with the !IO parameters.<br>
</blockquote>
<br></div>
princ_cc("Rosetta\n") is just a normal curried higher-order term.<br>
The intesting bit here is spawn/3. The library manual's explanation is:<br>
<br>
spawn(Closure, IO0, IO) is true iff `IO0' denotes a list of I/O<br>
transactions that is an interleaving of those performed by<br>
`Closure' and those contained in `IO' - the list of transactions performed<br>
by the continuation of spawn/3.<div class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Somebody could add some of this explanation to the rosettacode example which is currently rather bare.<br>
</blockquote>
<br></div>
Ok, I'll do that.<div class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Also the info on how to compile it.<br>
</blockquote>
<br></div>
$ mmc concurrent_computing.m<br>
<br>
Since most grades support some form of concurrency that should be it.<br>
(For those grades that don't a runtime error will occur.)<br>
<br>
Cheers,<br>
Julien.<br>
</blockquote></div><br></div>