skoop
Piles
Scoop out one thing from a pile or text by its spot number.
How to write it
skoop(<pile or text>, <spot>)
What it does
skoop(pile, 2) gives you the thing at spot 2. Spots start at 0.
pile[2] does exactly the same thing. Negative spots count from the end: -1 is the last thing.
Example
grunk pets = snorf("dog", "cat", "fish")
oga skoop(pets, 0) ugg dog
oga pets[2] ugg fish
oga pets[-1] ugg fish too
Tips
- Asking for a spot that is not there gives an OOGA! error.