On Thu, Nov 13, 2008 at 05:02:56PM +0100, TSa wrote:
> HaloO,
>
> Patrick R. Michaud wrote:
>> I expect that $a will become one(True, False, True).  $a doesn't
>> collapse to a non-Junction False until it is used in a boolean context.
>
> My proposal is a different unification behavior in one() junctions.
>
>>         my $a = one(1,2,3) % 2 == 1;
>>    -->  my $a = one(1%2, 2%2, 3%2) == 1;
>
>      -->  my $a = one(1,0,1) == 1;
>      -->  my $a = one(0) == 1;
>
>>    -->  my $a = one(1%2 == 1, 2%2 == 1, 3%2 == 1);
>
>      -->  my $a = one(0 == 1)
>
>>    -->  my $a = one( True, False, True );
>
>      -->  my $a = one(False);
>
>> I agree that one() with collapsing values isn't dwimmy (or useful),
>> which is part of the reason for my original message.
>
> I agree as well, but make a different proposal how to resolve it.
> BTW, how does an empty junction work? That could happen not only
> with one() but also through one(1,2,1,2) in my proposal. So one()
> is just another way of writing False ;)

It seems simpler to say that one() produces bags rather than sets.

Larry

Reply via email to