This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| crpl:docs:prependtolist [2013/07/29 14:31] – created thepenguin | crpl:docs:prependtolist [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ~~DISCUSSION~~ | + | |
| <- [[crpl: | <- [[crpl: | ||
| ===== PrependToList | ===== PrependToList | ||
| Line 6: | Line 6: | ||
| | List, Value |None| '' | | List, Value |None| '' | ||
| + | Inserts n1 at the beginning of L1 (at index 0) and shifts the index of all other elements in the list up by 1 | ||
| === Description === | === Description === | ||
| < | < | ||
| - | #prepends the value " | + | #prepends the value " |
| - | #This means it inserts " | + | <-list01 " |
| - | <-list01 " | + | |
| </ | </ | ||
| + | Sample '' | ||
| + | 0 - foo\\ | ||
| + | 1 - bar | ||
| + | |||
| + | Sample '' | ||
| + | 0 - hello\\ | ||
| + | 1 - foo\\ | ||
| + | 2 - bar | ||
| + | |||