On Saturday, 9. August 2008 04:41:46 John M. Dlugosz wrote: > Is this magic known to the parser at a low level, or is it possible to > define your own postcircumfix operators that interact with the > interpretation of the argument?
My interpretation is that there is a Whatever type that most of the time behaves like Int. So to handle it, you define postcircumfix:<[ ]>:(Whatever $slice) or so. The interesting question is what plain * returns because that is destined to mean the full slice. IMHO, this should be written ^*, which if the array becomes known becomes [EMAIL PROTECTED] > Is it possible to write: > @i = (1, 3, *-1); > say @data[$i]; > and get the same meaning as > say @data[1, 3, *-1]? I hope so. The type of the slice is Seq[Int,Int,Whatever]. Regards, TSa. -- "The unavoidable price of reliability is simplicity" -- C.A.R. Hoare "Simplicity does not precede complexity, but follows it." -- A.J. Perlis 1 + 2 + 3 + 4 + ... = -1/12 -- Srinivasa Ramanujan