develooper Front page | perl.perl6.language | Postings from June 2005

Re: reduce metaoperator on an empty list

Thread Previous | Thread Next
From:
Larry Wall
Date:
June 7, 2005 14:51
Subject:
Re: reduce metaoperator on an empty list
Message ID:
20050607215056.GA1145@wall.org
On Tue, Jun 07, 2005 at 09:41:49PM +0000, Luke Palmer wrote:
: < and > still don't make sense as reduce operators.

Yeah, I keep confusing them with min and max.

: That reminds me, how are <, >, etc. defined anyway?  How can we tell
: them to be list-associative with each other?

Because they're all of that specific precedence level, which is defined
to work that way by fiat, I suspect.  (Other operators have to be
explicitly declared as list associative, and even then are only list
associative with themselves, not with all other operators in their
precedence level.)  I suppose it could be construed as some kind of
default property on the actual precedence level, but it's not clear
that that would be a useful generalization.

Larry

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About