#lang scheme

(define genera-tabla-estimulos
  (lambda (lst-estimulos lst-valores)
    (letrec
        ((VV lst-valores)
         (genera-asig
          (lambda (lista-subcombi)
            (append-map 
             (lambda (subcombi)
               (map
                (lambda (val-verdad)
                  (if (list? subcombi)
                      (append subcombi (list val-verdad))
                      (list subcombi val-verdad))) 
                VV))
             lista-subcombi) ))
         (asignando
          (lambda (lista-variables-prop)
            (let go ((x (sub1 (length lista-variables-prop)))
                     (temp VV))
              (cond
                ((= x 0) temp)
                (else
                 (go (sub1 x) (genera-asig temp))))
              ) ))
         )
      (asignando lst-estimulos)
      )
    ))


(provide genera-tabla-estimulos)

