Stéphane writes:
> Hyper operators with operands of different size are partly covered
> in A3:
>
> Hyper operators will also intuit where a dimension is missing from one
> of its arguments, and replicate a scalar value to a list value in that
> dimension. That means yo
Will Hyper operators work on strings as well ?
e.g.
('pic1','pic2','pic3') ^_ ('.jpg')
or even
my @images = qw( pic1 pic2 pic3) ^_ ('.jpg');
R.
--
Richard Nuttall
On Fri, Oct 05, 2001 at 09:50:53AM +0100, Richard Nuttall wrote:
> my @images = qw( pic1 pic2 pic3) ^_ ('.jpg');
my @images = map { $_ _ '.jpg' } qw(pic1 pic2 pic3);
Hmmm, that's visually unappealing.
Just thinking out loud.
--
Michael G. Schwern <[EMAIL PROTECTED]>http://www.pobox.co
Michael G Schwern writes:
> my @images = map { $_ _ '.jpg' } qw(pic1 pic2 pic3);
>
> Hmmm, that's visually unappealing.
my @images = map { "$_.jpg" } qw(pic1 pic2 pic3);
Now that's sexay.
Nat
I think this would be interesting for U :")
http://www.cs.yorku.ca/Courses/3401/lectures/340198-11-27HTML/
http://www.cogs.susx.ac.uk/local/books/nlp-in-prolog/ch04/chapter-04-sh-1.5.
html#sh-1.5
| On Thu, 4 Oct 2001, Michael G Schwern wrote:
|
| > > Backtracking is at the heart of Logic Program
Is the following correct for := :
left side is like function in the respect that the right side is treated
differently depending on the left-side-types i.e. left side is like
prototype!! for the right side.
(@a ,@b) := (@b,@a)
is the same as :
(\@a, \@b) = (\@b, \@a);#if we had ref-allowed on
http://www.perlmonks.org/index.pl?node_id=71319&lastnode_id=71484
"Richard Nuttall" <[EMAIL PROTECTED]> writes:
> Will Hyper operators work on strings as well ?
>
> e.g.
>
> ('pic1','pic2','pic3') ^_ ('.jpg')
>
> or even
>
> my @images = qw( pic1 pic2 pic3) ^_ ('.jpg');
Doesn't that clash with the default currying argument?
--
Piers
Thus it was written in the epistle of David Nicol,
> Michael G Schwern wrote:
>
> > Binary ;
> >
> > This worries me. Giving ; two meanings makes basic language parsing
> > harder, which would be fine if there was a big payoff, but there's
> > not. Just making shorthand for [[1,2,3],[4,5,6]] d
Thank you.
For those who aren't yet busy reading, you can find it at:
http://www.perl.com/pub/a/2001/10/03/exegesis3.html
On Fri, 5 Oct 2001, Garrett Goebel wrote:
> For those who aren't yet busy reading, you can find it at:
> http://www.perl.com/pub/a/2001/10/03/exegesis3.html
OK, I have a question.
On page 3 you say:
> Because the Perl 6 "diamond" operator can take an arbitrary expression
> as its argument, it'
David M. Lloyd:
# On Fri, 5 Oct 2001, Garrett Goebel wrote:
#
# > For those who aren't yet busy reading, you can find it at:
# > http://www.perl.com/pub/a/2001/10/03/exegesis3.html
#
# OK, I have a question.
#
# On page 3 you say:
#
# > Because the Perl 6 "diamond" operator can take an arbitrary
#
When you say Unary here:
Binary (low) | Binary (high) |Unary
__|___|_
| |
or | || | |
Damian Conway wrote:
> David Nicol wrote:
>> Hear ye, hear ye, Ming of Mongo has declared!
>
> I really hope I'm just missing the implicit smiley there.
What you're missing is me wracking my memory to remember what
Dr. Zharkov called his tunneling craft that the hyperbinding
operator
Well, my head is definitely spinning. :) Thanks, Damian.
One oversight (on one of our parts - you either didn't put it in or I
didn't see it. :)): it looks like the example uses the new ";" operator
(between the mandatory and option arguments in the function declaration?),
but it's not mentione
Can I get a .car and a .cdr please? In my limited mind "key" and "value"
are specific to hashes and their wimpy brother associative lists.
-sam
Can I get a what what?
Well, "car" and "cdr" don't really fit; the key and value of a pair can be any
type of object, unlike the Lisp case where the cdr is always a list
(while the car can be either a list or an atom). But you can always
define your own accessor methods with whatever names you like. :)
What's an assoc
On Fri, 5 Oct 2001, Mark J. Reed wrote:
> Well, "car" and "cdr" don't really fit; the key and value of a pair can be any
> type of object, unlike the Lisp case where the cdr is always a list
> (while the car can be either a list or an atom).
Incorrect - "cdr" can be anything at all, just like
On Fri, Oct 05, 2001 at 06:59:52PM -0400, Sam Tregar wrote:
> > But you can always define your own accessor methods with whatever
> > names you like. :)
>
> I can? How do I do that?
My understanding is that there won't be anything terribly magical
about the built-in datatypes/classes. So if you
> Will Hyper operators work on strings as well ?
Yes. You can "hype" *any* operator (except ^)
Damian
> Is the following correct for := :
>
> left side is like function in the respect that the right side is treated
> differently depending on the left-side-types i.e. left side is like
> prototype!! for the right side.
Yep.
> (@a ,@b) := (@b,@a)
> is the same as :
> (\
> > my @images = qw( pic1 pic2 pic3) ^_ ('.jpg');
>
> Doesn't that clash with the default currying argument?
No. The DCA is: $^_
Damian
> OK, I have a question.
>
> On page 3 you say:
>
> > Because the Perl 6 "diamond" operator can take an arbitrary expression
> > as its argument, it's possible to set a filehandle to read an entire
> > file and do the actual reading, all in a single statement:
> >
> >
> When you say Unary here:
>
> Binary (low) | Binary (high) |Unary
>
> Don't you mean "bitwise"? If not then I'm confused :-)
Looks like *I'm* the one who was confused! ;-)
Yes, indeed, they should be:
s/Binary/Boolean/g
s/Unary/
> Well, my head is definitely spinning. :) Thanks, Damian.
Just doing my job, Citizen.
;-)
> One oversight (on one of our parts - you either didn't put it in or I
> didn't see it. :)): it looks like the example uses the new ";" operator
> (between the mandatory and option argum
> Can I get a .car and a .cdr please? In my limited mind "key" and "value"
> are specific to hashes and their wimpy brother associative lists.
Sure. Roll-you-own with:
module PAIR;
method car { return .key }
method cdr { return .value }
or, if you're really
26 matches
Mail list logo