💾 Archived View for gemini.omarpolo.com › post › love-for-cadr.gmi captured on 2021-12-04 at 18:04:22. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-12-03)

➡️ Next capture (2022-01-08)

-=-=-=-=-=-=-

↩ back to the index

love for c(a|d)+r

Published: 2020-11-15

Tagged with:

#lisp

#shitposting

I had this piece of data

(("12345" (("Content-Disposition" "form-data" (("name" . "code"))))))

and I wanted to extract the cons with “name” and “code”. Armed with my ‘a’s and ‘d’s I wrote (interactively, one letter at a time)

(caaddr (caadar thing))

then I though “two function call is too much”

(caaddaadar thing)

but ‘caaddaadar’ doesn’t exists.

Life sucks even more now.

---

P.S.: yeah, I was trying to extract data from the output of rfc2388:parse-mime.

P.P.S.: yeah, I was trying to extract the wrong thing: “code” is the input name and “12345” is the value.

P.P.P.S.: yup, eventually I replaced that with trivia (pattern matching.)

-- text: CC-BY-SA-4.0; code: public domain unless specified otherwise

For comments, write at < blog at omarpolo dot com > or @yumh@pleroma.libretux.com in the fediverse.

Capsule proudly assembled with Clojure