LOOP ... CONTINUE

Raymond Toy toy.raymond at gmail.com
Wed Mar 24 21:14:43 UTC 2021


    Marco> Hi I was porting some code to CL which has many

    Marco> for .. {
    Marco>   if ... continue; ...
    Marco> }

    Marco> What is the best way to render this with LOOP? (No ITERATE
    Marco> please.)  Must we wrap the LOOP with a TAGBODY?

I think this is the wrong place to ask.  But I'd do something like

(loop ...
  do
    (if ...
      ()
     ...))

That is a fairly straight-forward translation.  You continue if the
condition is true in C, so in lisp, you do nothing if it's true and do
the stuff what other stuff if it's false.

--
Ray





More information about the clo-devel mailing list