4 ms·
Two good books which are in the sort of style you seek are: The Little Schemer <http://www.amazon.com/Little-Schemer-Daniel-P-Friedman/dp/0262560992/> http:
by parenthesis 16y ago
Two good books which are in the sort of style you seek are:
The Little Schemer <http://www.amazon.com/Little-Schemer-Daniel-P-Friedman/dp/0262560992/> http://www.amazon.com/Little-Schemer-Daniel-P-Friedman/dp/02...; and
Clause and Effect <http://www.amazon.com/Clause-Effect-Programming-Working-Programmer/dp/3540629718/> http://www.amazon.com/Clause-Effect-Programming-Working-Prog....
Also a help is that the languages they use ('use' is a more appropriate word here than 'teach') — Scheme and Prolog, respectively — are much more mathematical in nature than typical mainstream languages are.
- gtani 16y agothis is sort of discrete math with haskell examples http://www.amazon.com/Haskell-Logic-Maths-Programming-Computing/dp/0954300696/ http://www.amazon.com/Haskell-Logic-Maths-Programming-Comput...
- silentbicycle 16y agoI second Clause and Effect. (The Little Schemer, too, but CAE doesn't get much attention.) Sterling and Shapiro's _The Art of Prolog_ is also excellent, though you'll probably be better off reading _Clause and Effect_ first if you've never used Prolog. CAE is all about getting a feel for how Prolog operates, step-by-step* , while TAoP is about the logic programming paradigm, interspersed with project case studies and comparisons between Prolog (as an LP implementation with various compromises) and "pure" LP. * This is the main thing it has in common with The Little Schemer: both begin by stepping through their respective languages' evaluation at a micro-level, until the semantics feel totally clear. This is especially helpful since Scheme and Prolog are both very different from the typical imperative/OO languages people know. FWIW, The Little MLer is written in the same style as TLS, and is a good, lightweight introduction to ML's type system / static typing.
- silentbicycle 16y agoAlso, if for whatever reason you have a hard time grokking Prolog, there's also an excellent chapter on LP and Prolog in CTM.