Hi,

I recently released a book about mathematics and programming in github:
https://github.com/liuxinyu95/unplugged

I mainly provide examples, and code snippets in Haskell. The PDF can be downloaded under GNU FDL license.

There are 7 chapters together with 108 problems as exercise. I also included all the answers in the appendix. Here are the table of content:

Preface - A story about isomorphism.
Chapter 1, Natural numbers. Peano Axiom, list and folding;
Chapter 2, Recursion. Euclidean algorithm, Lambda calculus, and Y-combinator;
Chapter 3, Symmetry. Group, Ring, and Field. Galois Theory;
Chapter 4, Category theory and type system;
Chapter 5, Deforest. Build-fold fusion law, optimization, and algorithm deduction;
Chapter 6, Infinity. Set theory, Infinity and stream;
Chapter 7, Logic paradox, Gödel's incompleteness theorems, and Turing halting problem.
Answers to the exercise.