GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Embed Notice

HTML Code

Corresponding Notice

  1. Embed this notice
    screwlisp (screwtape@mastodon.sdf.org)'s status on Monday, 17-Feb-2025 17:41:28 JSTscrewlispscrewlisp
    • Riley S. Faelan
    • DougMerritt (log😅 = 💧log😄)

    @riley @dougmerritt
    Yeah,
    (let ((alist '((:foo . bar) (:baz buz))))
    (cdr (assoc :foo alist)) ; -> bar
    (cadr (assoc :baz alist))) ; -> buz
    There isn't a lot of cost (well, one cons to nil) of using cadr or second instead of cdr. And then you could store other stuff in later positions of the list as well. When I only knew the definitions of assoc and pairlis, I mostly used cdr, but then in lisp code I've read, like you said, the cadr one seems more common in lots of places.

    In conversationabout 3 months ago from mastodon.sdf.orgpermalink
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.