On 3/6/06, Harmon Nine <[EMAIL PROTECTED]> wrote:
> I think the "Powerset" function needs a correction: the H|{Powerset T}
> expression won't give you what you want (unless it's a compact
> expression representing the subset of the powerset that contains H).
> Instead, you need to prepend H to every member of {Powerset T}, as
> "PrependList" does below (using a difference list):
That was my first thought, too. However, in the context of
non-deterministic choice, the H|{Powerset T} will in fact
(nondeterministically) generate all members of the power set. Your
version has the advantage of being deterministic and therefore
probably more efficient, at the cost of more work doing the
programming. I'm not aware of any problems which can *only* be
expressed with nondeterminism, so it's the familiar tradeoff between
expressiveness and efficiency.
Max
--
Be pretty if you are,
Be witty if you can,
But be cheerful if it kills you.
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users