by shigemk2

当面は技術的なことしか書かない

Emacs Lisp 多重ループ

(setq desired-number-one 10)
(setq desired-number-two 10)
(setq count-one 1)
(while (<= count-one desired-number)
  (setq count-two 1)
  (while (<= count-two desired-number)
    (message "message in-loop: %d" count-two)
    (setq count-two (1+ count-two)))
  (message "message out-loop: %d" count-one)
  (setq count-one (1+ count-one)))

厳密にはLispじゃないけど、応用はできるとおもう(cl-loopを使ってもいいけど) 11. Lisp(for Common Lisp)とフローチャート