all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Why is booleanp defined this way?
@ 2015-04-17 20:34 Marcin Borkowski
  2015-04-17 20:49 ` Jorge A. Alfaro-Murillo
                   ` (3 more replies)
  0 siblings, 4 replies; 33+ messages in thread
From: Marcin Borkowski @ 2015-04-17 20:34 UTC (permalink / raw
  To: Help Gnu Emacs mailing list

Hi all,

this is what I found in subr.el:

,----
| (defun booleanp (object)
|   "Return t if OBJECT is one of the two canonical boolean values: t or nil.
| Otherwise, return nil."
|   (and (memq object '(nil t)) t))
`----

Seemingly, it doesn't make much sense: what is the purpose of saying

(and (whatever) t)

instead of just

(whatever)

for a predicate?  Of course, this "normalizes" any "truthy" value to
"t", but is it really needed for anything (except perhaps being
elegant)?

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



^ permalink raw reply	[flat|nested] 33+ messages in thread
[parent not found: <mailman.946.1429302909.904.help-gnu-emacs@gnu.org>]

end of thread, other threads:[~2015-04-19 23:15 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-17 20:34 Why is booleanp defined this way? Marcin Borkowski
2015-04-17 20:49 ` Jorge A. Alfaro-Murillo
     [not found] ` <mailman.962.1429303822.904.help-gnu-emacs@gnu.org>
2015-04-17 23:06   ` Emanuel Berg
2015-04-18  0:41     ` Pascal J. Bourguignon
2015-04-18  1:06       ` Emanuel Berg
2015-04-18  1:23         ` Pascal J. Bourguignon
2015-04-18  7:44         ` Marcin Borkowski
2015-04-18  8:37         ` Stefan Nobis
2015-04-19 23:15           ` Emanuel Berg
2015-04-18  2:37 ` Drew Adams
2015-04-18  6:13 ` Tassilo Horn
     [not found] <mailman.946.1429302909.904.help-gnu-emacs@gnu.org>
2015-04-17 20:55 ` Pascal J. Bourguignon
2015-04-17 23:20 ` Barry Margolin
2015-04-17 23:30   ` Emanuel Berg
2015-04-18  0:43     ` Pascal J. Bourguignon
2015-04-18  3:13       ` Barry Margolin
2015-04-18  3:12     ` Barry Margolin
2015-04-18  2:01 ` Rusi
2015-04-18  2:23   ` Emanuel Berg
2015-04-18  2:33     ` Rusi
2015-04-18  2:55       ` Emanuel Berg
2015-04-18  3:11         ` Barry Margolin
2015-04-18  3:35           ` Rusi
2015-04-18  4:56             ` Barry Margolin
2015-04-19 23:08               ` Emanuel Berg
2015-04-19 23:00             ` Emanuel Berg
2015-04-18 21:24           ` Emanuel Berg
2015-04-18  7:52         ` Marcin Borkowski
     [not found]         ` <mailman.997.1429343558.904.help-gnu-emacs@gnu.org>
2015-04-18 12:43           ` Rusi
2015-04-18  4:09       ` Pascal J. Bourguignon
2015-04-18  5:00         ` Rusi
2015-04-18  3:50   ` Pascal J. Bourguignon
2015-04-18  5:03     ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.