anchor.diff:                   :bar-position    0
                    :convertor       (generate-exchanger *alphabet* to-alphabet)
                    :invertor        (generate-exchanger to-alphabet *alphabet*)))
  +
  +(defgeneric set-rotor  (rotor init-position)
  +  (:documentation
  +   "Set bar-position of the ROTOR to INIT-POSITION.
  +INIT-POSITION must be a character (a...z) or an integer (1...26)."))
   
   (defmethod set-rotor ((r rotor) (c character))
     (setf (bar-position r)
  
positive.code: (defparameter *alphabet* "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    "The alphabet string used in a plaintext and a cyphertext.
  Default is \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\".")
  
  (defgeneric machine    (reflector
                          left-rotor middle-rotor right-rotor
                          plugs
                          input-string)
    (:documentation
     "Encode/Decode INPUT-STRING.
   * REFLECTOR is a one of reflectors (built-in reflector A,B,C, or user defined reflector).
   * LEFT-ROTOR, MIDDLE-ROTOR, RIGHT-ROTOR are a one of rotors
     (built-in rotor I,II,III,IV,V,VI,VII,VIII,Beta,Gamma or user defined rotor).
   * PLUGS is a list of a two characters/symbols which interchanges each other.
     e.g. plugs, ((#\a #\b) (c d)) makes plugboard a <-> b and c <-> d.
   * INPUT-STRING is a string to be encode/decode by machine."))
  
  (defgeneric set-rotor  (rotor init-position)
    (:documentation
     "Set bar-position of the ROTOR to INIT-POSITION.
  INIT-POSITION must be a character (a...z) or an integer (1...26)."))
  
  (defgeneric rotate     (rotor))
  (defgeneric convert    (char-num convertor))
  
negative.code: ;;;; Last modified : 2013-08-03 20:39:15 tkych
  
  ;; cl-enigma/enigma.lisp
  
  