>>3 It's macroexpanded code. I could have easily changed the readtable to downcase the printed symbols, but I had no reason to. If you would have read it more closely, you would know that that code isn't even valid CL code, it's implementation specific code for SBCL. It's the result of macroexpanding that factorial function provided later in the post.
Name:
Anonymous2009-11-04 2:29
>>4 If you would have read it more closely, you would know that YHBT .
Not long ago I've written this def lenY(sequence):
return (lambda le : (lambda cc: le(lambda x: cc(cc)(x)))(lambda cc: le(lambda x: cc(cc)(x))))(
lambda cont: lambda (s, acc): acc if not s else cont((s[1:], acc + 1)))(
(sequence, 0)) And then decided to abandon programming forever, for I will never be able to surpass this creation of mine.
Name:
122009-11-04 18:24
By the way, notice the curious lack of closing braces. That's FIOC magic for you. It's all more magical since no actual FIOC were performed.
>>28-29
It's probably Clojure, but you can implement a reader macro like that with ease in CL, just it seems like a waste of valuable macro characters. If I were to use [] for anything, it would probably be a shorthand for#'(lambda (_) ...), but I already have an Emacs key chord for inserting that...
Name:
Anonymous2009-11-07 9:06
Clojure is a lisp-1, so there's no need to star-quote functions. It looks more like the python slice operator. How it found its way into lisp I don't know.
>>36
What? I already said I don't need to use [] for a lambda shorthand, since I have my Emacs insert #'(lambda (x) ) automatically, thus I have no need for such a macro character.