Re: Returning no value



Use a when clause in the loop.
Something like:
(loop for elt in lst
when (not (null elt))
collect elt)
.



Relevant Pages

  • Idiomatic lisp - loops
    ... (defun kv-insert (list elt) ... (let* ((h (car list)) ... (setq acc (append (reverse list) ... loop iteration. ...
    (comp.lang.lisp)
  • Re: increasing counter whithin loop?
    ... > prev = nil ... > prev = elt ... a nicer way for this loop... ...
    (comp.lang.ruby)
  • Re: Iterating over generic sequences.
    ... Using ELT with LOOP or DOTIMES (which seems needlessly inefficient, ... especially for lists). ... (defun do-stuff-with-sequence (sequence) ...
    (comp.lang.lisp)
  • Re: increasing counter whithin loop?
    ... Notching up the counter in a C-style loop is a _concise_ way to do ... prev = nil ... prev = elt ... I'm not sure I would find the C version clearer if I ...
    (comp.lang.ruby)
  • Re: Best way to "filter" an array
    ... Elt must be declared as Variant to be used in a For Each loop ... Dim Elt As Variant ... array v, so should Elt be dimmed as a String if v contains String values? ...
    (microsoft.public.excel.programming)