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 ;)

Regards, TSa.
--

"The unavoidable price of reliability is simplicity" -- C.A.R. Hoare
"Simplicity does not precede complexity, but follows it." -- A.J. Perlis
1 + 2 + 3 + 4 + ... = -1/12  -- Srinivasa Ramanujan

Reply via email to