--- Jonathan Scott Duff <[EMAIL PROTECTED]> wrote: > Maybe we've gone over this before but, if so, I don't remember ... > > On Tue, Oct 29, 2002 at 05:16:48PM -0800, Michael Lazzaro wrote: > > hyperoperators: > > > > [op] - as prefix to any unary/binary operator, "vectorizes" the > > > operator > > > . - method call on current topic > > What would [.]method() mean?
@a = @b[.]method(); # Sets each @a[x] to @b[x].method() Thinking out loud ... @a = @b[.method()]; # Sets @a to the value stored in @b indexed by # current context.method() > > > < > <= >= == != <=> - comparision > > lt gt le ge eq ne cmp > > What do these do? > > if $a [<] @b { ... } # if $a < all(*@b) Credible. > if @a [<] @b { ... } # if $a[0] < all(*@b) && > # $a[1] < all(*@b) && > # $a[2] < all(*@b) My inclination here is that $a[0] < $b[0] && $a[1] < $b[1] ... > $a [&] @b # all($a,*@b) ??? Questionable. Perhaps an array s.t. @result[x] = $a & @b[x] ? On the other hand, I like the idea of being able to distribute an operator using this syntax... @a = @b op $c versus ?? = @b [op] $c What's the difference? One maybe produces @b[x] op $c while the other produces -> { $result = $c; for @b -> $b { $c op= $b; } } But then it's not legal any more in array context unless @b is a LoL. Erk! > @a [&] @b # all(*@a,*@b) ??? Array s.t. @result[x] = @a[x] & @b[x] > @a = ($b [,] @c); # @a = ($b, *@c); ??? LoL: @a[x] = ($b, @c[x]) > I'm not even sure how to hyper these two. I guess if I had an array > of "range objects" I could hyper ; Hypersemi is probably just the same as hypercomma, since the circumlocutions needed to use it are such that you'll probably specify the construction clearly. But if not: @a = @b [;] @c --> @a[x] = ((@b[x]) ; (@c[x])) > Would this write to several filehandles? > > print @file_handles [:] "fooey!\n"; > > > .. - range > > And this is the one that made me start thinking about hypering the > others > > @a = @b[..]@c # @a = ($b[0]..$c[0], $b[1]..$c[1], ...) ??? > @a = $b[..]@c # @a = ($b..$c[0], $b..$c[1], ...) ??? > @a = @b[..]$c # @a = ($b[0]..$c, $b[1]..$c, ...) ??? > You, too? Range was the first thing I started trying to hyper. > I know that this stuff probably seems obvious to everyone, but I'd > rather have it explicit just in case :-) if $x == any(@b[..]@c) print "In one of the ranges...\n"; or if $x ~~ any(@b[..]@c) print "In one of the ranges...\n"; Does .. create an implicit flexpr in numeric context, or does it require smartmatch? =Austin __________________________________________________ Yahoo! - We Remember 9-11: A tribute to the more than 3,000 lives lost http://dir.remember.yahoo.com/tribute