Re: Smart match table

2006-02-09 Thread Stuart Cook
On 10/02/06, Stuart Cook <[EMAIL PROTECTED]> wrote: > IIRC, that rule exists so you can create when-clauses that don't > involve the current topic, without having to explicitly throw it away. > This is useful when using given/when to replace a sequence of elsifs, > when not all of them use $_. (I

Re: Smart match table

2006-02-09 Thread Stuart Cook
On 09/02/06, Mike Guy <[EMAIL PROTECTED]> wrote: > Robin Houston <[EMAIL PROTECTED]> wrote > > Any Code()simple closure truth match if $b->() (ignoring $a) > > I obviously missed that when it went past on p5p. Surely that should > read > > Any Code()predicate(value)

Re: Smart match table

2006-02-09 Thread David Green
On 2/8/06, Mike Guy wrote: I obviously missed that when it went past on p5p. Surely that should read Any Code()predicate(value) match if $b->($a) meaning that $a satisfies the predicate implemented by the code $b? Ignoring $a seems a completely stupid thing to do. Well, t

Re: Smart match table

2006-02-09 Thread Mike Guy
Robin Houston <[EMAIL PROTECTED]> wrote > Any Code()simple closure truth match if $b->() (ignoring $a) I obviously missed that when it went past on p5p. Surely that should read Any Code()predicate(value) match if $b->($a) meaning that $a satisfies the predicat

Re: Smart match table

2006-02-08 Thread mark . a . biggar
-- Original message -- From: Luke Palmer <[EMAIL PROTECTED]> > On 2/7/06, Robin Houston <[EMAIL PROTECTED]> wrote: > > Any undef undefinedmatch if !defined $a > > Any Regex pattern matchmatch if $a =~ /$b/ > >

Re: Smart match table

2006-02-08 Thread Damian Conway
Luke wrote: > My interpretation (which may be totally off, as I don't have any > confirmation that anybody else is thinking the same way I am) is that > the synopsis is wrong, and commutivity of ~~ is a happy coincidence > wherever it exists. The way I've been thinking about ~~ is just as > the f

Re: Smart match table

2006-02-08 Thread Luke Palmer
On 2/7/06, Robin Houston <[EMAIL PROTECTED]> wrote: > Any undef undefinedmatch if !defined $a > Any Regex pattern matchmatch if $a =~ /$b/ > Code() Code()results are equalmatch if $a->() eq $b->() > Any Code()simple cl

Smart match table

2006-02-07 Thread Robin Houston
The table of smart matches in S4 has this: ... Any Str string equality match if $_ eq $x ... Any Rule pattern matchmatch if $_ ~~ /$x/ ... By my (and Damian's) interpretation of the table, this means that "string" ~~ /rule/ would be inte