Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defn futureCost [goal]
- (loop [p (priority-map)
- cand (filter #(= (count %) (count goal)) words)]
- (let [w1 (first cand)]
- (if (empty? cand)
- p
- (recur
- (assoc p w1 (dist w1 goal))
- (rest cand))))))
Advertisement
Add Comment
Please, Sign In to add comment