lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Fri, May 15, 2009 at 5:00 AM, steve donovan wrote:
>> - Something to fill all elements in a slice with a value. (This could
>> also apply to your other containers.)
>
> Yes, List.assign_slice  represents the cool Python feature L[i:j] =
> ls, but there's an obvious other operation to set a slice to a
> constant value, and naturally both of these generalize to 2D.

...also called "splice" in some other languages [1-3], which is a
generalization of the PL List.splice.

[1] http://perldoc.perl.org/functions/splice.html
[2] http://us2.php.net/array_splice
[3] http://www.w3schools.com/jsref/jsref_splice.asp