>>1
They're hardly the first to invent closures. >>6 (loop for i from 0 to 10 collect (let ((a i)) #'(lambda () a))) (Would have been (loop for i from 0 to 10 collect #'(lambda () i)), if not for how loop's bindings work)
Alternatively: (mapcar #'(lambda (i) (lambda () i)) (loop for i from 1 to 10 collect i))
or
(defun seq (a b) (loop for i from a to b collect i))
(mapcar #'(lambda (i) (lambda () i)) (seq 1 10))
Do you want an array instead of a list? just change 2 atoms: (map 'vector #'(lambda (i) (lambda () i)) (seq 1 10))
>>19
Symta is somehow less readable than Lisp, and that's not valid Python. Go back to /g/.
Name:
FrozenVoid!!mJCwdV5J0Xy2A212011-11-09 12:09
>most important innovation
Ability to prototype code in minutes. Closures are for leaking memory and messing up stack frames: they are completely useless, despite what CS courses tell you.
>>18
It's all about mental maps. When I read Lisp code I understand the semantics of the code nearly instantly, and if I'm missing something, using SLIME's x-ref/macroexpand features is only a key-chord away. CL can be as difficult to read as normal languages when someone (ab)uses readtables extensively, but by default CL's syntax is easy to remember (usually it's just a few prefixes on some forms which are directly expanded as they should be into regular s-exp's (most of the time, technically you can generate in-memory objects at read-time, and in some cases this is used)).