Another easy Monday except this one is little bit more easy than last one. Here is the task.
I finished rather fast with initial version, but doing little changes for of times I’ve ended up with this.
(ns daily-programmer.20161121_easy.core (:use [clojure.string :only [split-lines]])) (def wire-rules-m {"white" {:to-cut #{} :not-to-cut #{"white" "black"}} "red" {:to-cut #{"green"} :not-to-cut #{}} "black" {:to-cut #{} :not-to-cut #{"white" "green" "orange"}} "orange" {:to-cut #{"red" "black"} :not-to-cut #{}} "green" {:to-cut #{"orange" "white"} :not-to-cut #{}} "purple" {:to-cut #{} :not-to-cut #{"purple" "green" "orange" "white"}}}) (defn can-cut?
...
Read more