4 ms·
Good point. Hey, aren't Lisp s-expressions just a less powerful form of XML nested structures? I think Lisp should be re-written in XML. So this: (defun fac
by cabalamat 18y ago
Good point. Hey, aren't Lisp s-expressions just a less powerful form of XML nested structures? I think Lisp should be re-written in XML. So this:
(defun factorial (n)
(return (if (< n 2) 1
(factorial (-1 n)))))
Would become:
<!DOCTYPE xmllisp>
<program>
<function name="factorial">
<parameters>n</parameters>
<return>
<if><condition>n < 2</condition>
<iftrue>1</iftrue>
<iffalse>
<functionCall name="factorial">n - 1</functionCall>
</iffalse>
</if>
</return>
</function>
</program>
Which I think we can all agree makes much more sense.