Sudoku: Difference between revisions

m
Line 4,198:
| Some values -> values |> Map.toSeq |> Seq.map (snd>>string) |> String.concat ""
| _ -> error
 
/// Using depth-first search and propagation, try all possible values.
let rec search (values:Map<_,_>) =
Line 4,217 ⟶ 4,218:
/// Solve Sudoku using Constraint Propagation
let solve grid = grid |> applyCPS >>= search |> prettyPrint</lang>
'''Usage'''<lang fsharp>open System
open SudokuCPS
 
Line 4,308 ⟶ 4,309:
 
Press any key to exit</pre>
 
===The Function SLPsolve===
<lang fsharp>