Ideas?
Thanks, Steve
---
(def nqueens (board-size) (with (diagonals nil finished nil jsg 0 result '(0) row nil total 0) (while (~ finished) (let (diagonals2 result2 row2 total2) (get-next-row board-size diagonals result total) (if row2 (if (is (len result2) board-size) (do (let (diagonals3 result3 total3) (print-result diagonals2 result2 total2) (do (= diagonals2 diagonals3) (= result2 result3) (= total2 total3)))) (= result2 (goto-next-column result2))) (if (is (len result2) 1) (= finished t) (let (diagonals3 result3) (goto-previous-column diagonals2 result2) (= diagonals2 diagonals3) (= result2 result3)))) (= diagonals diagonals2) (= result result2) (= row row2) (= total total2))) (string "Number of results: " total)))
-----