From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.help Subject: Why is booleanp defined this way? Date: Fri, 17 Apr 2015 22:34:45 +0200 Message-ID: <87siby7au6.fsf@mbork.pl> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1429302930 25314 80.91.229.3 (17 Apr 2015 20:35:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 17 Apr 2015 20:35:30 +0000 (UTC) To: Help Gnu Emacs mailing list Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 17 22:35:21 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YjCyu-00036Q-6c for geh-help-gnu-emacs@m.gmane.org; Fri, 17 Apr 2015 22:35:20 +0200 Original-Received: from localhost ([::1]:43402 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YjCyt-0001ev-Ki for geh-help-gnu-emacs@m.gmane.org; Fri, 17 Apr 2015 16:35:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38537) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YjCyg-0001c4-OJ for help-gnu-emacs@gnu.org; Fri, 17 Apr 2015 16:35:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YjCyc-0002AR-FE for help-gnu-emacs@gnu.org; Fri, 17 Apr 2015 16:35:06 -0400 Original-Received: from mail.mojserwer.eu ([195.110.48.8]:53522) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YjCyc-00025n-8n for help-gnu-emacs@gnu.org; Fri, 17 Apr 2015 16:35:02 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id 1D5664FA03B for ; Fri, 17 Apr 2015 22:34:55 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu Original-Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oZGCt4P35Eoj for ; Fri, 17 Apr 2015 22:34:51 +0200 (CEST) Original-Received: from localhost (117-116.echostar.pl [213.156.117.116]) by mail.mojserwer.eu (Postfix) with ESMTPSA id 177A34F6079 for ; Fri, 17 Apr 2015 22:34:50 +0200 (CEST) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 195.110.48.8 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:103779 Archived-At: 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