<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://www.gentoo-zh.org/extern.php?action=feed&amp;tid=585&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Gentoo中文社区 / ANSI Common Lisp 附录 B：Lisp in Lisp]]></title>
		<link>https://www.gentoo-zh.org/viewtopic.php?id=585</link>
		<description><![CDATA[ANSI Common Lisp 附录 B：Lisp in Lisp 最近发表的帖子。]]></description>
		<lastBuildDate>Fri, 18 Nov 2022 13:17:00 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[ANSI Common Lisp 附录 B：Lisp in Lisp]]></title>
			<link>https://www.gentoo-zh.org/viewtopic.php?pid=625#p625</link>
			<description><![CDATA[<p>这个附录包含了 58 个最常用的 Common Lisp 操作符。因为如此多的 Lisp 是（或可以）用 Lisp 所写成，而由于 Lisp 程序（或可以）相当精简，这是一种方便解释语言的方式。</p><p>这个练习也证明了，概念上 Common Lisp 不像看起来那样庞大。许多 Common Lisp 操作符是有用的函式库；要写出所有其它的东西，你所需要的操作符相当少。在这个附录的这些定义只需要:</p><p>applyarefbackquoteblockcarcdrceilingchar=consdefmacrodocumentationeqerrorexptfdefinitionfunction``floorgensymget-setf-expansionifimagpartlabelslengthmultiple-value-bindnth-valuequoterealpartsymbol-functiontagbodytype-oftypep=+-/&lt;&gt;</p><p>这里给出的代码作为一种解释 Common Lisp 的方式，而不是实现它的方式。在实际的实现上，这些操作符可以更高效，也会做更多的错误检查。为了方便参找，这些操作符本身按字母顺序排列。如果你真的想要这样定义 Lisp，每个宏的定义需要在任何调用它们的代码之前。</p><p>(defun -abs (n)<br />&#160; (if (typep n &#039;complex)<br />&#160; &#160; &#160; (sqrt (+ (expt (realpart n) 2) (expt (imagpart n) 2)))<br />&#160; &#160; &#160; (if (&lt; n 0) (- n) n)))</p><p>(defun -adjoin (obj lst &amp;rest args)<br />&#160; (if (apply #&#039;member obj lst args) lst (cons obj lst)))</p><p>(defmacro -and (&amp;rest args)<br />&#160; (cond ((null args) t)<br />&#160; &#160; &#160; &#160; ((cdr args)&#160; `(if ,(car args) (-and ,@(cdr args))))<br />&#160; &#160; &#160; &#160; (t&#160; &#160; &#160; &#160; &#160; &#160;(car args))))</p><p>(defun -append (&amp;optional first &amp;rest rest)<br />&#160; (if (null rest)<br />&#160; &#160; &#160; first<br />&#160; &#160; &#160; (nconc (copy-list first) (apply #&#039;-append rest))))</p><p>(defun -atom (x) (not (consp x)))</p><p>(defun -butlast (lst &amp;optional (n 1))<br />&#160; (nreverse (nthcdr n (reverse lst))))</p><p>(defun -cadr (x) (car (cdr x)))</p><p>(defmacro -case (arg &amp;rest clauses)<br />&#160; (let ((g (gensym)))<br />&#160; &#160; `(let ((,g ,arg))<br />&#160; &#160; &#160; &#160;(cond ,@(mapcar #&#039;(lambda (cl)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;(let ((k (car cl)))<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;`(,(cond ((member k &#039;(t otherwise))<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;t)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; ((consp k)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;`(member ,g &#039;,k))<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; (t `(eql ,g &#039;,k)))<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;(progn ,@(cdr cl)))))<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;clauses)))))</p><p>(defun -cddr (x) (cdr (cdr x)))</p><p>(defun -complement (fn)<br />&#160; #&#039;(lambda (&amp;rest args) (not (apply fn args))))</p><p>(defmacro -cond (&amp;rest args)<br />&#160; (if (null args)<br />&#160; &#160; &#160; nil<br />&#160; &#160; &#160; (let ((clause (car args)))<br />&#160; &#160; &#160; &#160; (if (cdr clause)<br />&#160; &#160; &#160; &#160; &#160; &#160; `(if ,(car clause)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;(progn ,@(cdr clause))<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;(-cond ,@(cdr args)))<br />&#160; &#160; &#160; &#160; &#160; &#160; `(or ,(car clause)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;(-cond ,@(cdr args)))))))</p><p>(defun -consp (x) (typep x &#039;cons))</p><p>(defun -constantly (x) #&#039;(lambda (&amp;rest args) x))</p><p>(defun -copy-list (lst)<br />&#160; (labels ((cl (x)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160;(if (atom x)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;x<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;(cons (car x)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;(cl (cdr x))))))<br />&#160; &#160; (cons (car lst)<br />&#160; &#160; &#160; &#160; &#160; (cl (cdr lst)))))</p><p>(defun -copy-tree (tr)<br />&#160; (if (atom tr)<br />&#160; &#160; &#160; tr<br />&#160; &#160; &#160; (cons (-copy-tree (car tr))<br />&#160; &#160; &#160; &#160; &#160; &#160; (-copy-tree (cdr tr)))))</p><p>(defmacro -defun (name parms &amp;rest body)<br />&#160; (multiple-value-bind (dec doc bod) (analyze-body body)<br />&#160; &#160; `(progn<br />&#160; &#160; &#160; &#160;(setf (fdefinition &#039;,name)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160;#&#039;(lambda ,parms<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;,@dec<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;(block ,(if (atom name) name (second name))<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;,@bod))<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160;(documentation &#039;,name &#039;function)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160;,doc)<br />&#160; &#160; &#160; &#160;&#039;,name)))</p><p>(defun analyze-body (body &amp;optional dec doc)<br />&#160; (let ((expr (car body)))<br />&#160; &#160; (cond ((and (consp expr) (eq (car expr) &#039;declare))<br />&#160; &#160; &#160; &#160; &#160; &#160;(analyze-body (cdr body) (cons expr dec) doc))<br />&#160; &#160; &#160; &#160; &#160; ((and (stringp expr) (not doc) (cdr body))<br />&#160; &#160; &#160; &#160; &#160; &#160;(if dec<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;(values dec expr (cdr body))<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;(analyze-body (cdr body) dec expr)))<br />&#160; &#160; &#160; &#160; &#160; (t (values dec doc body)))))</p><p>这个定义不完全正确，参见 let</p><p>(defmacro -do (binds (test &amp;rest result) &amp;rest body)<br />&#160; (let ((fn (gensym)))<br />&#160; &#160; `(block nil<br />&#160; &#160; &#160; &#160;(labels ((,fn ,(mapcar #&#039;car binds)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;(cond (,test ,@result)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;(t (tagbody ,@body)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; (,fn ,@(mapcar #&#039;third binds))))))<br />&#160; &#160; &#160; &#160; &#160;(,fn ,@(mapcar #&#039;second binds))))))</p><p>(defmacro -dolist ((var lst &amp;optional result) &amp;rest body)<br />&#160; (let ((g (gensym)))<br />&#160; &#160; `(do ((,g ,lst (cdr ,g)))<br />&#160; &#160; &#160; &#160; &#160;((atom ,g) (let ((,var nil)) ,result))<br />&#160; &#160; &#160; &#160;(let ((,var (car ,g)))<br />&#160; &#160; &#160; &#160; &#160;,@body))))</p><p>(defun -eql (x y)<br />&#160; (typecase x<br />&#160; &#160; (character (and (typep y &#039;character) (char= x y)))<br />&#160; &#160; (number&#160; &#160; (and (eq (type-of x) (type-of y))<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; (= x y)))<br />&#160; &#160; (t&#160; &#160; &#160; &#160; &#160;(eq x y))))</p><p>(defun -evenp (x)<br />&#160; (typecase x<br />&#160; &#160; (integer (= 0 (mod x 2)))<br />&#160; &#160; (t&#160; &#160; &#160; &#160;(error &quot;non-integer argument&quot;))))</p><p>(defun -funcall (fn &amp;rest args) (apply fn args))</p><p>(defun -identity (x) x)</p><p>这个定义不完全正确：表达式 (let ((&amp;key 1) (&amp;optional 2))) 是合法的，但它产生的表达式不合法。</p><p>(defmacro -let (parms &amp;rest body)<br />&#160; `((lambda ,(mapcar #&#039;(lambda (x)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;(if (atom x) x (car x)))<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;parms)<br />&#160; &#160; &#160; ,@body)<br />&#160; &#160; ,@(mapcar #&#039;(lambda (x)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; (if (atom x) nil (cadr x)))<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; parms)))</p><p>(defun -list (&amp;rest elts) (copy-list elts))</p><p>(defun -listp (x) (or (consp x) (null x)))</p><p>(defun -mapcan (fn &amp;rest lsts)<br />&#160; (apply #&#039;nconc (apply #&#039;mapcar fn lsts)))</p><p>(defun -mapcar (fn &amp;rest lsts)<br />&#160; (cond ((member nil lsts) nil)<br />&#160; &#160; &#160; &#160; ((null (cdr lsts))<br />&#160; &#160; &#160; &#160; &#160;(let ((lst (car lsts)))<br />&#160; &#160; &#160; &#160; &#160; &#160;(cons (funcall fn (car lst))<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;(-mapcar fn (cdr lst)))))<br />&#160; &#160; &#160; &#160; (t<br />&#160; &#160; &#160; &#160; &#160;(cons (apply fn (-mapcar #&#039;car lsts))<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;(apply #&#039;-mapcar fn<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; (-mapcar #&#039;cdr lsts))))))</p><p>(defun -member (x lst &amp;key test test-not key)<br />&#160; (let ((fn (or test<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; (if test-not<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; (complement test-not))<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; #&#039;eql)))<br />&#160; &#160; (member-if #&#039;(lambda (y)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;(funcall fn x y))<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;lst<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;:key key)))</p><p>(defun -member-if (fn lst &amp;key (key #&#039;identity))<br />&#160; (cond ((atom lst) nil)<br />&#160; &#160; &#160; &#160; ((funcall fn (funcall key (car lst))) lst)<br />&#160; &#160; &#160; &#160; (t (-member-if fn (cdr lst) :key key))))</p><p>(defun -mod (n m)<br />&#160; (nth-value 1 (floor n m)))</p><p>(defun -nconc (&amp;optional lst &amp;rest rest)<br />&#160; (if rest<br />&#160; &#160; &#160; (let ((rest-conc (apply #&#039;-nconc rest)))<br />&#160; &#160; &#160; &#160; (if (consp lst)<br />&#160; &#160; &#160; &#160; &#160; &#160; (progn (setf (cdr (last lst)) rest-conc)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;lst)<br />&#160; &#160; &#160; &#160; &#160; &#160; rest-conc))<br />&#160; &#160; &#160; lst))</p><p>(defun -not (x) (eq x nil))<br />(defun -nreverse (seq)<br />&#160; (labels ((nrl (lst)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160;(let ((prev nil))<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;(do ()<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;((null lst) prev)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;(psetf (cdr lst) prev<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; prev&#160; &#160; &#160; lst<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; lst&#160; &#160; &#160; &#160;(cdr lst)))))<br />&#160; &#160; &#160; &#160; &#160; &#160;(nrv (vec)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160;(let* ((len (length vec))<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; (ilimit (truncate (/ len 2))))<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;(do ((i 0 (1+ i))<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; (j (1- len) (1- j)))<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;((&gt;= i ilimit) vec)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;(rotatef (aref vec i) (aref vec j))))))<br />&#160; &#160; (if (typep seq &#039;vector)<br />&#160; &#160; &#160; &#160; (nrv seq)<br />&#160; &#160; &#160; &#160; (nrl seq))))</p><p>(defun -null (x) (eq x nil))</p><p>(defmacro -or (&amp;optional first &amp;rest rest)<br />&#160; (if (null rest)<br />&#160; &#160; &#160; first<br />&#160; &#160; &#160; (let ((g (gensym)))<br />&#160; &#160; &#160; &#160; `(let ((,g ,first))<br />&#160; &#160; &#160; &#160; &#160; &#160;(if ,g<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;,g<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;(-or ,@rest))))))</p><p>这两个 Common Lisp 没有，但这里有几的定义会需要用到。</p><p>(defun pair (lst)<br />&#160; (if (null lst)<br />&#160; &#160; &#160; nil<br />&#160; &#160; &#160; (cons (cons (car lst) (cadr lst))<br />&#160; &#160; &#160; &#160; &#160; &#160; (pair (cddr lst)))))</p><p>(defun -pairlis (keys vals &amp;optional alist)<br />&#160; (unless (= (length keys) (length vals))<br />&#160; &#160; (error &quot;mismatched lengths&quot;))<br />&#160; (nconc (mapcar #&#039;cons keys vals) alist))</p><p>(defmacro -pop (place)<br />&#160; (multiple-value-bind (vars forms var set access)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;(get-setf-expansion place)<br />&#160; &#160; (let ((g (gensym)))<br />&#160; &#160; &#160; `(let* (,@(mapcar #&#039;list vars forms)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; (,g ,access)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; (,(car var) (cdr ,g)))<br />&#160; &#160; &#160; &#160; &#160;(prog1 (car ,g)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; ,set)))))</p><p>(defmacro -prog1 (arg1 &amp;rest args)<br />&#160; (let ((g (gensym)))<br />&#160; &#160; `(let ((,g ,arg1))<br />&#160; &#160; &#160; &#160;,@args<br />&#160; &#160; &#160; &#160;,g)))</p><p>(defmacro -prog2 (arg1 arg2 &amp;rest args)<br />&#160; (let ((g (gensym)))<br />&#160; &#160; `(let ((,g (progn ,arg1 ,arg2)))<br />&#160; &#160; &#160; &#160;,@args<br />&#160; &#160; &#160; &#160;,g)))</p><p>(defmacro -progn (&amp;rest args) `(let nil ,@args))</p><p>(defmacro -psetf (&amp;rest args)<br />&#160; (unless (evenp (length args))<br />&#160; &#160; (error &quot;odd number of arguments&quot;))<br />&#160; (let* ((pairs (pair args))<br />&#160; &#160; &#160; &#160; &#160;(syms (mapcar #&#039;(lambda (x) (gensym))<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;pairs)))<br />&#160; &#160; `(let ,(mapcar #&#039;list<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;syms<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;(mapcar #&#039;cdr pairs))<br />&#160; &#160; &#160; &#160;(setf ,@(mapcan #&#039;list<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;(mapcar #&#039;car pairs)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;syms)))))</p><p>(defmacro -push (obj place)<br />&#160; (multiple-value-bind (vars forms var set access)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;(get-setf-expansion place)<br />&#160; &#160; (let ((g (gensym)))<br />&#160; &#160; &#160; `(let* ((,g ,obj)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; ,@(mapcar #&#039;list vars forms)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; (,(car var) (cons ,g ,access)))<br />&#160; &#160; &#160; &#160; &#160;,set))))</p><p>(defun -rem (n m)<br />&#160; (nth-value 1 (truncate n m)))</p><p>(defmacro -rotatef (&amp;rest args)<br />&#160; `(psetf ,@(mapcan #&#039;list<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; args<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; (append (cdr args)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; (list (car args))))))</p><p>(defun -second (x) (cadr x))</p><p>(defmacro -setf (&amp;rest args)<br />&#160; (if (null args)<br />&#160; &#160; &#160; nil<br />&#160; &#160; &#160; `(setf2 ,@args)))</p><p>(defmacro setf2 (place val &amp;rest args)<br />&#160; (multiple-value-bind (vars forms var set)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;(get-setf-expansion place)<br />&#160; &#160; `(progn<br />&#160; &#160; &#160; &#160;(let* (,@(mapcar #&#039;list vars forms)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; (,(car var) ,val))<br />&#160; &#160; &#160; &#160; &#160;,set)<br />&#160; &#160; &#160; &#160;,@(if args `((setf2 ,@args)) nil))))</p><p>(defun -signum (n)<br />&#160; (if (zerop n) 0 (/ n (abs n))))</p><p>(defun -stringp (x) (typep x &#039;string))</p><p>(defun -tailp (x y)<br />&#160; (or (eql x y)<br />&#160; &#160; &#160; (and (consp y) (-tailp x (cdr y)))))</p><p>(defun -third (x) (car (cdr (cdr x))))</p><p>(defun -truncate (n &amp;optional (d 1))<br />&#160; (if (&gt; n 0) (floor n d) (ceiling n d)))</p><p>(defmacro -typecase (arg &amp;rest clauses)<br />&#160; (let ((g (gensym)))<br />&#160; &#160; `(let ((,g ,arg))<br />&#160; &#160; &#160; &#160;(cond ,@(mapcar #&#039;(lambda (cl)<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;`((typep ,g &#039;,(car cl))<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;(progn ,@(cdr cl))))<br />&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;clauses)))))</p><p>(defmacro -unless (arg &amp;rest body)<br />&#160; `(if (not ,arg)<br />&#160; &#160; &#160; &#160;(progn ,@body)))</p><p>(defmacro -when (arg &amp;rest body)<br />&#160; `(if ,arg (progn ,@body)))</p><p>(defun -1+ (x) (+ x 1))</p><p>(defun -1- (x) (- x 1))</p><p>(defun -&gt;= (first &amp;rest rest)<br />&#160; (or (null rest)<br />&#160; &#160; &#160; (and (or (&gt; first (car rest)) (= first (car rest)))<br />&#160; &#160; &#160; &#160; &#160; &#160;(apply #&#039;-&gt;= rest))))</p>]]></description>
			<author><![CDATA[dummy@example.com (batsom)]]></author>
			<pubDate>Fri, 18 Nov 2022 13:17:00 +0000</pubDate>
			<guid>https://www.gentoo-zh.org/viewtopic.php?pid=625#p625</guid>
		</item>
	</channel>
</rss>
