rules.cljs 428 B

1234567891011121314151617181920
  1. (defn temp-rule [one two three] true)
  2. (defn proc
  3. ([line]
  4. (if (empty? line)
  5. []
  6. (proc false (first line) (second line) (drop 2 line) [])))
  7. ([one two three r acc]
  8. (let [rule temp-rule]
  9. (if (nil? two)
  10. (conj acc (rule false one false))
  11. (if (nil? three)
  12. (conj acc (rule one two false))
  13. (proc two three (first r) (rest r) (conj acc (rule one two three))))))))