From 7138ebb2a84208799f0c49264976c6245fbfd6fe Mon Sep 17 00:00:00 2001 From: Nathan Froyd Subject: [PATCH 31/39] add RUN-SOLVER-ON-FILE function --- src/lisp/solver.lisp | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/src/lisp/solver.lisp b/src/lisp/solver.lisp index 08471ad..f71821d 100755 --- a/src/lisp/solver.lisp +++ b/src/lisp/solver.lisp @@ -137,3 +137,8 @@ "reads boards on stdin and solves them. A word per line is output. An empty line separates the list of words for a board." (run-solver *standard-input*)) + +(defun run-solver-on-file (file) + (with-open-file (stream file :direction :input + :element-type 'character) + (run-solver stream))) -- 1.6.2