On Sat, Feb 05, 2005 at 04:30:58PM +0800, Autrijus Tang wrote:
: So it turns out that A03 says that semicolons within "brackets" defaults
: to a list-of-list builder.  Curiously, it is missing from S03, and the
: behaviour is not documented in detail.

That's because it's still a bit hand-wavey.

: Currently I assume the "brackets" above listish generators -- (), [], {}
: -- but not blocks under list context.  That is:
: 
:     sub foo { 1 ; 2 ; 3 }     # returns 3
:     sub bar { ( 1 ; 2 ; 3 ) } # returns ([1],[2],[3])
: 
: Is this the correct understanding?

Yes, unless it returns [[1],[2],[3]] instead.  (What you have written is
context dependent.)

: If so, S03 needs to be patched to say that (and more).

S09 talks about it some.  Basically semicolon is useful where you want
to talk about a list of lists, such as in a multidimensional slice.

Larry

Reply via email to