On Thu, Jun 25, 2009 at 02:47:55PM +1000, Timothy S. Nelson wrote:
> What would happen if we had an operator that returned the number of
> true values? Say we call it "boolean plus", or "bop".
...why an operator?
sub bop(*...@values) { + grep { $_ }, @values }
> To give one exa
I'm just thinking out loud in this e-mail, trying to generate
alternatives.
What would happen if we had an operator that returned the number of
true values? Say we call it "boolean plus", or "bop".
To give one example: 1 bop 3 = 2
Say we're looking at: ($x > 1) bop 3 bop (
On Wed, Jun 24, 2009 at 10:35, John Macdonald wrote:
> Which means that short-circuiting is not right here - it must
> go through the entire list to determine whether there are zero
> true selections, find the first of exactly one true selections,
> or die if there are more than one true selection
Author: lwall
Date: 2009-06-25 00:49:31 +0200 (Thu, 25 Jun 2009)
New Revision: 27213
Modified:
docs/Perl6/Spec/S05-regex.pod
Log:
[S05] some clarification requested by moritz++ re ws in longest tokens
Modified: docs/Perl6/Spec/S05-regex.pod
On Wed, Jun 24, 2009 at 11:10:39AM -0700, Jon Lang wrote:
> On Wed, Jun 24, 2009 at 10:35 AM, John Macdonald wrote:
> > On Tue, Jun 23, 2009 at 07:51:45AM +1000, Damian Conway wrote:
> >> Perl 6's approach to xor is consistent with the linguistic sense of
> >> 'xor' ("You may have a soup (x)or a sa
On Wed, Jun 24, 2009 at 10:35 AM, John Macdonald wrote:
> On Tue, Jun 23, 2009 at 07:51:45AM +1000, Damian Conway wrote:
>> Perl 6's approach to xor is consistent with the linguistic sense of
>> 'xor' ("You may have a soup (x)or a salad (x)or a cocktail"), [ ... ]
>
> That choice tends to mean "exa
On Wed, Jun 24, 2009 at 01:35:25PM -0400, John Macdonald wrote:
> On Tue, Jun 23, 2009 at 07:51:45AM +1000, Damian Conway wrote:
> > Perl 6's approach to xor is consistent with the linguistic sense of
> > 'xor' ("You may have a soup (x)or a salad (x)or a cocktail"), [ ... ]
>
> That choice tends t
On Tue, Jun 23, 2009 at 07:51:45AM +1000, Damian Conway wrote:
> Perl 6's approach to xor is consistent with the linguistic sense of
> 'xor' ("You may have a soup (x)or a salad (x)or a cocktail"), [ ... ]
That choice tends to mean "exactly one", rather than "the first one
the waiter hears". (A go