Now we will take a look at the action words that are dedicated to changing a series in one way or another—changing, adding, or deleting items.
Changing a series
Changing items – poke, replace, and change
There are two ways to change an item in a series. Let's use data: [A B C D], where A, B, C and D are all words. Suppose we want to replace C with the word X. We can do this as follows:
- Binding to a path specified by the item index—for example, data/3: 'X ;== X. Now data has become [A B X D]. Why do we need 'X instead of just X? The reason is that when you're binding to a word, this word is evaluated. So you have to quote the X word in order to prevent evaluation. If you don&apos...