Function MAKE-RANDOM-STATE
make-random-state &optional state => new-state
state - 乱数状態か、nilか、t。 デフォルトはnil。
new-state - 乱数状態オブジェクト
*random-state*の値として使いやすい 型random-stateの新しいオブジェクトを生成します。
もしstateが乱数状態オブジェクトのとき、 new-stateはそのオブジェクトをコピーしたものです。 もしstateがnilのとき、 new-stateは現在の乱数状態をコピーしたものです。 もしstateがtのとき、 new-stateは何とかして初期状態をランダムにした 新しい乱数状態オブジェクトです。
(let* ((rs1 (make-random-state nil))
       (rs2 (make-random-state t))
       (rs3 (make-random-state rs2))
       (rs4 nil))
  (list (loop for i from 1 to 10 
              collect (random 100)
              when (= i 5)
               do (setq rs4 (make-random-state)))
        (loop for i from 1 to 10 collect (random 100 rs1))
        (loop for i from 1 to 10 collect (random 100 rs2))
        (loop for i from 1 to 10 collect (random 100 rs3))
        (loop for i from 1 to 10 collect (random 100 rs4))))
=> ((29 25 72 57 55 68 24 35 54 65)
    (29 25 72 57 55 68 24 35 54 65)
    (93 85 53 99 58 62 2 23 23 59)
    (93 85 53 99 58 62 2 23 23 59)
    (68 24 35 54 65 54 55 50 59 49))なし。
なし。
stateが乱数状態、nil、tのどれでもないときは、 型type-errorのエラーが通知されるべきです。
make-random-stateの重要な使い方として、 ひとつのプログラム内で同じ疑似乱数の列を 何度も生成することができます。