|
From: | Lars Ingebrigtsen |
Subject: | Re: Add hints to documentation of car and cdr for (e)lisp newcomers - take 2 |
Date: | Thu, 15 Jul 2021 06:38:12 +0200 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Stefan Kangas <stefan@marxist.se> writes: > The R6RS does it with examples: > > (car pair) procedure > > Returns the contents of the car field of pair. > > (car ’(a b c)) ⇒ a > (car ’((a) b c d)) ⇒ (a) > (car ’(1 . 2)) ⇒ 1 > (car ’()) &assertion exception Yeah, perhaps that'd be nice? Something like: (car '(a b c)) => a (car '(1 . 2)) => 1 (car nil) => nil Also see `cdr'. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no
[Prev in Thread] | Current Thread | [Next in Thread] |