<div dir="ltr">
>
Actually, I would advise against doing this. The code of solutions/2 has to do<br>
>
something that cannot be done in pure Mercury: communicating information<br>
>
between different branches of a disjunction. It therefore has to use impure code,<br>
>
even though the interface it is implementing has a pure semantics. This works,<br><div>
> but I wouldn't recommend the code to nonexperts. <br></div><div><br></div><div>I did look at the source, and saw this was how it worked.</div><div><br></div><div>It's not that it's hard to build the list myself, or make a fold predicate. I figured</div><div>that solutions must use special functionality to get the decision points, and so</div><div>it wasn't clear how fast that would be compared with doing the equivalent</div><div>myself with standard/public language features.<br></div></div>