 (defn result
   [execute-program-result]
   (map last execute-program-result))
+
+(declare score)
 
 (defn validate-result
   [result]

                "ポリオミノが重なっています。"))
            (validate-enclosed []
              (try
                (and (area-size board :search-8-way? true) nil)
                (catch #+clj clojure.lang.ExceptionInfo #+cljs cljs.core.ExceptionInfo _ "ポリオミノで囲み込めていません。")))]
      (or (validate-origin)
          (validate-overlaps)

  
(defn execute-programs
  [polyominos programs]
  (letfn [(execute-functions [polyomino [function & more :as functions]]
            (cons polyomino (lazy-seq (if functions
                                        (execute-functions (cond->> polyomino
                                                             function (function))
                                                           more)))))
          (execute-program [polyomino program]
            (if-not (empty? program)
              (execute-functions polyomino program)))]
