Repetitive structure with continuation counter
(repeat n do_statements )
(foreach name list do_statements )
Examples
(setq test 1) |
|
(repeat 4 (princ test) (princ "\n") (setq test (+ 1 test)) ) |
(defun test_repeat (count) (setq a 10) (setq b 100) (repeat count (setq a (+ a 10)) (setq b (+ b 100)) ) )
(test_repeat 5) |
|
(test_repeat 0) |
|
(foreach n '(a b c) (princ n) (princ "\n") ) |
This website has been archived and is no longer maintained.