[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: predicates
From: |
Pascal J. Bourguignon |
Subject: |
Re: predicates |
Date: |
Fri, 27 Nov 2015 05:28:54 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Emanuel Berg <embe8573@student.uu.se> writes:
> Alex Bennée <alex.bennee@linaro.org> writes:
>
>> It's a predicate, giving a true/false response.
>
> This is how I understand it:
>
> In practice predicates can return anything.
>
> nil, and the empty list, should be interpreted as *false*.
They return a generalized boolean, which can indeed be anything.
> Computers are deterministic but that doesn't mean they
> are consistent.
One notable predicate that returns something useful not obtainable
otherwise, is:
(digit-char-p ?4) --> 4
You could use:
(ignore-errors (parse-integer (string ?4))) --> 4
but parse-integer uses digit-char-p which is the more fundamental
operation.
--
__Pascal Bourguignon__ http://www.informatimago.com/
“The factory of the future will have only two employees, a man and a
dog. The man will be there to feed the dog. The dog will be there to
keep the man from touching the equipment.” -- Carl Bass CEO Autodesk
- Re: How to test if the current line contains only white-spache?, (continued)
- Message not available
- Re: How to test if the current line contains only white-space?, Rolf Ade, 2015/11/19
- Re: How to test if the current line contains only white-space?, Emanuel Berg, 2015/11/20
- Message not available
- Re: How to test if the current line contains only white-space?, Rolf Ade, 2015/11/20
- Re: How to test if the current line contains only white-space?, Emanuel Berg, 2015/11/23
- Message not available
- Re: How to test if the current line contains only white-space?, Rolf Ade, 2015/11/20
- Re: How to test if the current line contains only white-spache?, Alex Bennée, 2015/11/26
- predicates (was: Re: How to test if the current line contains only white-spache?), Emanuel Berg, 2015/11/26
- Message not available
- Re: predicates,
Pascal J. Bourguignon <=
- Re: predicates, Emanuel Berg, 2015/11/27
Re: How to test if the current line contains only white-spache?, Yuri Khan, 2015/11/16
Re: How to test if the current line contains only white-spache?, John Mastro, 2015/11/16
Re: How to test if the current line contains only white-spache?, Nicolas Richard, 2015/11/25
Message not available