A functional programming approach to solving Sudoku problems