Last active
December 14, 2016 10:22
-
-
Save zhouqiang-cl/668c89bc857151fabb431b6dc76ae402 to your computer and use it in GitHub Desktop.
common lisp的函数MINUSP, PLUSP,ZEROP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
语法 | |
minusp real => generalized-boolean | |
plusp real => generalized-boolean | |
zerop number => generalized-boolean | |
参数和值 | |
real -- 一个实数(有理数和物理数) | |
number -- 数(实数和虚数) | |
generalized-boolean -- 一个布尔型的值 | |
描述 | |
如果real的值小于0, minusp 的结果返回真,否则返回假 | |
如果real的值大于0, minusp 的结果返回真,否则返回假 | |
如果number的值为0, zerop 的结果返回真,否则返回假 | |
代码片段(`*`是sbcl的提示符) | |
* (zerop (/ 1 9)) | |
NIL | |
* (minusp -1) | |
T | |
* (plusp 1) | |
T |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment