Re: "not" question

2017-03-27 Thread ToddAndMargo
On 03/27/2017 10:36 AM, Timo Paulssen wrote: On 27/03/17 19:26, ToddAndMargo wrote: and `none("789")` is the opposite of `contains`? Nah, the fact that anything in the junction means "contains" is just because you're feeding the junction through the contains method. Junction evaluation happen

Re: "not" question

2017-03-27 Thread Timo Paulssen
On 27/03/17 19:26, ToddAndMargo wrote: > and `none("789")` is the opposite of `contains`? Nah, the fact that anything in the junction means "contains" is just because you're feeding the junction through the contains method. Junction evaluation happens with something we call "autothreading" (even

Re: "not" question

2017-03-27 Thread ToddAndMargo
On 27/03/17 19:11, Timo Paulssen wrote: !"789" is just False. On 27/03/17 18:53, ToddAndMargo wrote: Hi All, What am I doing wrong in my "AND not 789"? $ perl6 -e 'my $x="abc123def456"; my $y="123"; if $x.contains( $y & "abc" & ! "789" ) {say "Yes"} else {say "no"};'

Re: "not" question

2017-03-27 Thread ToddAndMargo
On 27/03/17 18:53, ToddAndMargo wrote: Hi All, What am I doing wrong in my "AND not 789"? $ perl6 -e 'my $x="abc123def456"; my $y="123"; if $x.contains( $y & "abc" & ! "789" ) {say "Yes"} else {say "no"};' no -T On 03/27/2017 10:11 AM, Timo Paulssen wrote: > !"789"

Re: "not" question

2017-03-27 Thread Timo Paulssen
Oh, I should have pointed out how to do what you actually meant to do: perl6 -e 'my $x = "abc123def456"; my $y = "123"; if $x.contains($y & "abc" & none("789")) { say "Yes" } else { say "No" }' Yes This uses a "none" junction, which takes part in the whole junction

Re: "not" question

2017-03-27 Thread Timo Paulssen
!"789" is just False. On 27/03/17 18:53, ToddAndMargo wrote: > Hi All, > > What am I doing wrong in my "AND not 789"? > > $ perl6 -e 'my $x="abc123def456"; > my $y="123"; if $x.contains( $y & "abc" & ! "789" ) > {say "Yes"} else {say "no"};' > > no > > -T >

"not" question

2017-03-27 Thread ToddAndMargo
Hi All, What am I doing wrong in my "AND not 789"? $ perl6 -e 'my $x="abc123def456"; my $y="123"; if $x.contains( $y & "abc" & ! "789" ) {say "Yes"} else {say "no"};' no -T -- ~~ Computers are like air conditioners. They malfunction