News for hackers. Stuff that matters.
Re:Simplified Common Lisp reference by shakna on Tuesday May 02, 2017 @04:15AM (#14244794)
You have let [0], why would you need a special loop function?

[0] http://jtra.cz/stuff/lisp/sclr/let.html

Edit:

That is to say, this is a simplified reference, and loop is a macro, not a special form.

Re:Simplified Common Lisp reference by juki on Tuesday May 02, 2017 @04:58AM (#14244984)
I assume you're thinking about Schemes `(let loop (...) ...)`, but that doesn't exist in Common Lisp. CL:LOOP is a looping macro with its own small DSL.

    (loop :for i :below 5
          :when (evenp i) :collect i)
    ;=> (0 2 4)
Re:Simplified Common Lisp reference by lispm on Tuesday May 02, 2017 @05:30AM (#14245110)
That's a step up from loops with 'goto':

    (prog ((result '())
           (i 0))
      loop
      (when (>= i 5)
        (return (reverse result)))
      (when (evenp i)
        (push i result))
      (incf i)
      (go loop))
Re:Simplified Common Lisp reference by TeMPOraL on Wednesday May 03, 2017 @07:21AM (#14254715)
tagbody/go is implementation detail of macro expansion though.
Re:Simplified Common Lisp reference by lispm on Wednesday May 03, 2017 @08:00AM (#14254942)
prog + goto was two decades one of the main tools for loops in Lisp...
Re:Simplified Common Lisp reference by kgwgk on Tuesday May 02, 2017 @04:57AM (#14244977)
This response makes no sense. Most of the functions in that page are not special forms. And both "car" and "first" are included! And "cdr" and "rest". And there are other functions that can be trivially obtained by the composition of two functions.
Re:Simplified Common Lisp reference by Koshkin on Tuesday May 02, 2017 @12:31PM (#14247846)
Note that both CAR and CDR refer to parts of a CONS cell which does not necessarily represent a list.
Re:Simplified Common Lisp reference by kgwgk on Wednesday May 03, 2017 @03:57PM (#14259431)
That doesn't change the fact that car and first are two names for one single function (the same applies to cdr and rest). (The point is that the absence of loop cannot be explained because it's not "needed".)