SHOW:
|
|
- or go back to the newest paste.
| 1 | (defn solve-goal [goal] | |
| 2 | (doseq [rule (fetch-rules goal)] | |
| 3 | - | (if (empty? (first rules)) |
| 3 | + | (if (empty? rule) |
| 4 | 0.9 ; a truth value | |
| 5 | (.submit completion-service (solve-rule rule)))) | |
| 6 | ; take the first result | |
| 7 | (if (= result 0.9) | |
| 8 | result | |
| 9 | (.get (.take completion-service)))) |