GOLF(2gg)

πŸ“¦ version 601.4.41, in ubuntu questing

πŸ’… GOLF(2gg) β€” the development manual, but make it cute

okay bestie, welcome to the GOLF(2gg) page ✨ this one lives in the Development section of the manual, and it's all about one little command that does one little thing and does it flawlessly. no cap.


πŸŽ€ NAME πŸŽ€

delete-lifo β€” (LIFO)

🌸 PURPOSE 🌸

okay so the whole ~point~ of this queen: she deletes LIFO list elements. that's the job. that's the vibe. periodt. πŸ’–

✨ SYNTAX ✨

delete-lifo <list>

literally that's it. one argument. she's low maintenance and we love that for her 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea, bestie β˜• β€” delete-lifo deletes the most recently added elements to the LIFO <list>, going up to and including the last one that was read. (that "including" is doing heavy lifting, don't skip it πŸ‘€)

that <list> has to have been created by new-lifo first, mmmkay? no list, no deleting. it's giving prerequisites. πŸ’…

right after a rewind-lifo, no element has been read yet, so delete-lifo will have no effect. nothing happens. a whole lot of nothing. and honestly? that's valid of her. πŸ“

also note β€” and this is the sneaky part, iykyk β€” write-lifo also performs an implicit rewind-lifo. so yeah. keep that in your pocket. πŸ™ˆ

and after any read-lifo, delete-lifo will delete all elements up to the element that was read, including that element. bye girl, you're gone. πŸ’€

🌈 EXAMPLES 🌈

okay here's the whole situation, step by step, look how cute she is:

new-lifo mylist

// Add data to the list
write-lifo mylist key "key1" value "value1"
write-lifo mylist key "some2" value "other2"

// Get first data from the list, it will be "some2" key
read-lifo mylist key k value v

// Delete first element from the list, so list will have only "key1" key
delete-lifo mylist

see how read-lifo grabbed the "some2" key first? LIFO behaviour, last in first out, main character energy πŸ‘‘ then delete-lifo yeets that first element and the list is left with just the "key1" key. iconic. ate. no crumbs. ✨

πŸ’œ SEE ALSO πŸ’œ

LIFO

and the whole squad, fr fr:

  • delete-lifo
  • get-lifo
  • new-lifo
  • purge-lifo
  • read-lifo
  • rewind-lifo
  • write-lifo

also: See all documentation 🌸


🧚 and that's the page, bestie! this lil cutie is from $VERSION, dated $DATE, and yes she really does say GOLF(2gg) at the bottom too. slay πŸ’–βœ¨πŸŽ€
πŸ“¦ where this page comes from