in reply to Array slices: beyond the end/ Assigning an empty list to a Hash slice
A slice of an empty list is still an empty list.
But a slice of an empty array (or beyond the present size of the array) is a list of undefs.
So:
CountZero
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
My blog: Imperial Deltronics
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Array slices: beyond the end/ Assigning an empty list to a Hash slice
by hazylife (Monk) on Mar 22, 2014 at 16:27 UTC | |
by CountZero (Bishop) on Mar 22, 2014 at 18:03 UTC | |
by 7stud (Deacon) on Mar 22, 2014 at 19:23 UTC |