anchor.diff:  (in-package :breakds.game24)
  -
  -;; (defmacro map-cartesian (fun &rest lists)
  -;;   (with-gensyms (x-vars y-var remain)
  -;;     `(macrolet ((reduce-iter (,x-vars ,y-var &rest ,remain)
  -;;                   (with-gensyms (x y)
  -;;                     (let ((len (length ,remain)))
  -;;                       `(reduce (lambda (,y ,x)
  -;;                                  ,(case len
  -;;                                         (1 `(cons (funcall ,,fun  
  -;;                                                            ,@(reverse 
  -;;                                                               ,x-vars) 
  -;;                                                            ,x)
  -;;                                                   ,y))
  -;;                                         (t `(reduce-iter ,(cons x ,x-vars)
  -;;                                                          ,y
  -;;                                                          ,@(cdr ,remain)))))
  -;;                                ,(car ,remain)
  -;;                                :initial-value ,,y-var)))))
  -;;        (reduce-iter nil nil ,@lists))))
   
   (defmacro map-cartesian (fun &rest lists)
     (labels ((reduce-iter (x-vars y-var remain)
  
positive.code: 		   ;; underscore.js from cdnjs
  		   "http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.4.4/underscore-min.js"
  		   ;; backbone.js from cdnjs
                     "http://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.0.0/backbone-min.js"
                     ;; bootstrap
                     "http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.2/js/bootstrap.min.js"))
    (defvar tmp-array (array (duplicate number-model :number 1)
                             (duplicate number-model :number 2)
                             (duplicate number-model :number 3)
                             (duplicate number-model :number 4)))
    (defvar number-set0 (duplicate number-set-model
                                   :model-list tmp-array))
    (defvar select0 (duplicate number-set-view
                               :model number-set0)))
              
       
  
  
negative.code:     (remove-if-not (lambda (x) (= (calc x) 24)) (gen lst nil nil))))
  
  
  (defparameter *max-number* 9)
  
  
  (def-model number-set-model
      ((defaults (properties :selected 0))))
  
  
  (def-view number-set-view
      ((tag-name "select")
       (template (eval-lisp 
                  (funcall (alambda (k accu)
                             (if (= k 0) accu
                                 (self (1- k)
                                       (mkstr "<option>" k "</option>" accu))))
                           *max-number* "")))
       (initialize (lazy-init
                    (append-to-parent)))
       (render (lambda ()
                 (render-from-model)
                 this))
       (events (create "change" "changed"))
       (changed (lambda ()
                  (@set "selected" (*number (@. this $el (val))))
                  nil))))
  
  (def-model submit-model
      ((defaults (properties :vent undefined))))
  
  (def-view submit-button
      ((tag-name "button")
       (template "Submit")
       (initialize (lazy-init
                    (append-to-parent)))
       (render (lambda ()
                 (render-from-model)
                 this))
       (events (create "click" "clicked"))
       (clicked (lambda ()
                  (@. (@get "vent") 
                      (trigger "submit-event"))))))
  
  
  (def-model single-solution-model
      ((defaults (properties :solution ""))))
  
  (def-view single-solution-view
      ((tag-name "tr")
       (template "<td><%=solution%></td>")
       (initialize (lazy-init
                    (append-to-parent)))
       (render (lambda ()
                 (render-from-model)
                 this))))
  
  (def-collection solutions-model
      ((model single-solution-model)))
  
  (def-collection-view solutions-view
      ((tag-name "table")
       (sub-view single-solution-view)
       (initialize (lazy-init
                    (append-to-parent)
                    (@. this model list (each (@ this lazy-add)))))
       (render (lambda ()
                 (render-from-model)
                 this))))
  
  (define-simple-app game24-app
      (:title "Game 24"
  