> According to Synopsis 2, under "Immutable types", a Junction is a "Set with
> additional behaviors".  This implies to me a Junction consists just of
> distinct unordered values.  A Junction is not a Bag and it doesn't matter
> that we lose the fact that a value occurred more than once in the arguments
> of the Junction constructor.  Whether values are considered identical or not
> and get eliminated depends on what their .WHERE returns.  Whether a Perl 6
> implementation internally reduces the constructor value list doesn't matter
> as long as the semantics of using the Junction are as if it had; so eg that
> reduction could be done lazily, just when the Junction is first used. --
>

Still that doesn't solve the problem of his code example. If my
understanding of the synopses is correct, operations on junctions
generate a new junction, so `one(1,2,3) % 2 == 1` will collapse to
one(1 % 2 == 1, 2 % 2 == 1, 3 % 2 == 1), which is one(true, false,
true). If it collapses, it will be one(true, false), and thus true,
but if it doesn't collapse it will be false.

Either I'm missing something, or the behavior of `one' needs to be
specified more thoroughly. I think I agree with Patrick that collapse
needs to be delayed there.

Regards,

Leon

Reply via email to