Front page | perl.perl6.language |
Postings from February 2005
Junction Values
Thread Next
From:
Rod Adams
Date:
February 15, 2005 16:25
Subject:
Junction Values
Message ID:
421292DC.4070409@rodadams.net
Okay, so we've established that:
$x = any(3,4,5);
@l = $x.values.sort;
Leaves us with @l == (3,4,5), and that makes a fair amount of sense.
What do the following evaluate to:
@l1 = all(3,4,5).values.sort;
@l2 = one(3,4,5).values.sort;
@l3 = none(3,4,5).values.sort;
@l4 = any(all(1,2),all(3,4)).values.sort;
If C<.values> doesn't it cut it for these cases, what other forms of
introspection are we going to allow on junctions, to determine what they
are?
On a slightly different topic, do the following equivalences work:
any($a, $a) == $a
any($a,$a,$b) == any($a,$b)
any(any($a,$b),any($c,$d)) == any($a,$b,$c,$d)
all($a, $a) == $a
all($a,$a,$b) == all($a,$b)
all(all($a,$b),any($c,$d)) == all($a,$b,$c,$d)
none($a, $a) == undef
none($a,$a,$b) == none($a,$b)
none(none($a,$b),none($c,$d)) == none($a,$b,$c,$d)
one($a, $a) == false
one($a,$a,$b) == ($a == $b ?? undef :: $b)
-- Rod Adams
Thread Next
-
Junction Values
by Rod Adams