Definitions
===
set (n) : A data container that can hold many elements simultaneously.
The order of elements in a set is meaningless. No two elements in a set
may hold the same value.
junction (n) : The combination of several independent values and an
explicit boolean predicate, to form an
Rod Adams wrote:
The purpose of a junction is to allow for performing several tests at a
given time, with the testing code needing no knowledge of that junctions
are present. While a junction can represent several values at the same
time, such notions as hold and contain should be avoided, and
Damian Conway skribis 2005-02-22 22:13 (+1100):
@x = func($a, [EMAIL PROTECTED]);
That's:
@x = »func«($a, @y);
But, y'know, this one almost convinces me. Especially when you consider:
sub func ($i, $j, $k) {...}
@x = func($a, [EMAIL PROTECTED], @z);
Naievely, I'd expect
Juerd wrote:
Naievely, I'd expect
my @a = @b = 1..3;
»foo«(@a, @b)
to result in
foo(@a[0], @b[0]),
foo(@a[1], @b[1]),
foo(@a[2], @b[2]);
but
foo([EMAIL PROTECTED], [EMAIL PROTECTED])
with the same arrays in
foo(@a[0], @b[0]),
foo(@a[0], @b[1]),
foo(@a[0],
Juerd writes:
Damian Conway skribis 2005-02-22 22:13 (+1100):
@x = func($a, [EMAIL PROTECTED]);
That's:
@x = func($a, @y);
But, y'know, this one almost convinces me. Especially when you consider:
sub func ($i, $j, $k) {...}
@x = func($a, [EMAIL PROTECTED], @z);
Damian Conway wrote:
Rod Adams wrote:
The purpose of a junction is to allow for performing several tests at a
given time, with the testing code needing no knowledge of that
junctions
are present. While a junction can represent several values at the same
time, such notions as hold and contain
Aldo Calpini wrote:
Damian Conway wrote:
@s = 'item' _ [EMAIL PROTECTED];
That's:
@s = 'item »_« @x;
(just checking that my unerstanding is correct, don't want to be
nitpicking :-)
assuming that you meant to prepend the string item to each element of
@x, isn't that:
@s =
Rod Adams wrote:
This is my major point of the post. In my opinion, your example of:
# Print a list of substrings...
my $substring = substr(junctions, any(1..3), any(3..6));
say $substring.values();
Is a perfect example of a place where saying:
# Print a list of substrings...
my
DC == Damian Conway [EMAIL PROTECTED] writes:
DC my %seen is shape(IO) of Bool; # %seen maps IO objects to boolean
values
DC while get_next_input_stream() - $in {
DC next if %seen{$in};
DC $text ~= slurp $in;
DC %seen{$in} = 1;
DC }
but
Damian Conway wrote:
Rod Adams wrote:
This is my major point of the post. In my opinion, your example of:
# Print a list of substrings...
my $substring = substr(junctions, any(1..3), any(3..6));
say $substring.values();
Is a perfect example of a place where saying:
# Print a list of
10 matches
Mail list logo