Discover the mathematics hiding inside the code you already write. Functions, types, composition, data structures. You use these ideas in code every day. Look a little closer and something surprising appears: math. The Algebra of Code teaches functional programming and mathematics together, using F# as a laboratory where you can run abstract ideas and see what they do. You don't need to know F# going in. Part I gets you reading and writing it, and everything you learn carries over to Haskell, OCaml, Scala, and the functional corners of C# and TypeScript. You'll build numbers and sets from scratch, turn algebraic expressions into data structures, write programs that simplify equations, build Boolean logic, and automate pieces of mathematical reasoning. Along the way, familiar programming concepts reveal deeper connections: algebraic data types follow rules that look remarkably like ordinary algebra, and function composition with strong typing leads toward category theory. More than 500 short coding exercises have you implement, test, break, and explore every idea yourself. By the time you reach lambda calculus, rings, and categories, they're structures you've already worked with in code. Volume 1 stands on its own, taking you from functional programming fundamentals through the mathematical ideas that make the deeper connections possible. It is the first of a planned three. For programmers with solid experience who want to understand math at a deeper level. No proofs or advanced math required. The math makes you a better programmer. The programming makes the math make sense.
ThriftBooks sells millions of used books at the lowest everyday prices. We personally assess every book's quality and offer rare, out-of-print treasures. We deliver the joy of reading in recyclable packaging with free standard shipping on US orders over $20. ThriftBooks.com. Read more. Spend less.