Juan Reynoso Elias
En 2016-09-23 11:19:02


 
(loop for foo in '(a b c) collect foo)
 ;;Result
 (A B C)

 (loop for foo on '(a b c) collect foo)
 ((A B C) (B C) (C))

 (loop for foo on '(a b c) append foo)
 ;; Result
 (A B C B C C)

 (loop
   for i from 2 to 10
   when (evenp i)
   collect i into evens
   else collect i into odds
   finally (return (list evens odds)))

 
 ;; Result
 ((2 4 6 8 10) (3 5 7 9))

 
#lisp
También te podría interesar