May 2014
Intermediate to advanced
520 pages
17h 23m
English
This chapter covers
Functional programming is an attempt to reach a declarative ideal in program composition. Functional techniques can lead to code that mirrors the form of the solution, but sometimes levels of expressiveness come at a cost in terms of speed. In problems of search, for example, matters related to the “how” of search intermingle with the “what” of the solution. In this chapter, we’ll explore matters of search and querying using functional approaches compared to logical techniques.
We’ll start by discussing search and building a Sudoku solver that uses a brute-force functional approach that strives to solve the ...