On Fri, Feb 18, 2005 at 11:31:54PM -0800, Brent 'Dax' Royal-Gordon wrote:
> Junctions are intended to ultimately be used in boolean tests.  That's
> why the values of the junction have an any/all/one/none relationship. 
> The proper data structure here is an array.  (Actually, ironically
> enough, it's probably a set, not an array.)

It's one set for any()/all()/one() and two sets for none().  Of course,
if something (eg. functions) cannot be tested for equality, then we'll
have to assume them to be unique from each other anyway, in which case
junctions do act as arrays.

> [1] Note, however, that this needs to be done carefully.  For example,
> while it doesn't really make sense for the string arguments of a call
> to C<print> to be junctions, the object argument is another matter
> entirely:
>     #!/usr/bin/perl6
>     # naive tee
>     $OUT=$OUT & open("> $_") for @ARGS;
>     print or die "Can't write to $!.filename: $!" for *$IN;    # Or
> however it's done this week

I think it's an unary "=" this week, according to S04:

    print for =*$IN;

Thanks,
/Autrijus/

Attachment: pgpGifnGif84A.pgp
Description: PGP signature

Reply via email to