Re: map { $_ => $_ } @foo

2005-04-26 Thread Thomas Sandlaß
Autrijus Tang wrote: map { $_ => $_; } @foo; This works too: map { ;$_ => $_ } @foo; But () is still only a grouper, so this won't do: map { ($_ => $_) } @foo; Does this make sense? A lot! BTW, is it possible to distinguish methods and subs from the toplevel, too? That li

Re: map { $_ => $_ } @foo

2005-04-25 Thread Autrijus Tang
On Sun, Apr 24, 2005 at 04:39:04PM -0700, Larry Wall wrote: > : Larry suggested that to keep it from being collapsed, we somehow > : augment toplevel AST: > : > : map { $_ => $_; } @foo; > : map { +($_ => $_) } @foo; > > Uh, I'm not sure what + would r

Re: map { $_ => $_ } @foo

2005-04-24 Thread Juerd
Larry Wall skribis 2005-04-24 18:50 (-0700): > [EMAIL PROTECTED] = (1..2:by(0)); [EMAIL PROTECTED] = 1 xx Inf; [EMAIL PROTECTED] = 1 xx @bar; Juerd -- http://convolution.nl/maak_juerd_blij.html http://convolution.nl/make_juerd_happy.html http://convolution.nl/gajigu_juerd_n.html

Re: map { $_ => $_ } @foo

2005-04-24 Thread Larry Wall
nstructor: : >: : >: map { $_ => $_ } @foo; : > : >: And maybe it can be extended over adverbial blocks, too: : >: : >: @foo.map:{ $_ => $_ }; # closure : : Why not just always use the ':' when you are giving a block. The : block is essentially an adverb for a map|

Re: map { $_ => $_ } @foo

2005-04-24 Thread Darren Duncan
At 4:39 PM -0700 4/24/05, Larry Wall wrote: On Mon, Apr 25, 2005 at 02:13:26AM +0800, Autrijus Tang wrote: : A while ago I posted a conflict between a block containing a pair : constructor, vs. a hash constructor: : : map { $_ => $_ } @foo; : And maybe it can be extended over adverbial blo

Re: map { $_ => $_ } @foo

2005-04-24 Thread Larry Wall
On Mon, Apr 25, 2005 at 02:13:26AM +0800, Autrijus Tang wrote: : A while ago I posted a conflict between a block containing a pair : constructor, vs. a hash constructor: : : map { $_ => $_ } @foo; : : Larry suggested that to keep it from being collapsed, we somehow : augment toplevel

map { $_ => $_ } @foo

2005-04-24 Thread Autrijus Tang
A while ago I posted a conflict between a block containing a pair constructor, vs. a hash constructor: map { $_ => $_ } @foo; Larry suggested that to keep it from being collapsed, we somehow augment toplevel AST: map { $_ => $_; } @foo; map { +($_ => $_) } @foo; But here