Exercises from "functional programming in scala" and sometimes "structure and interpretation of computer programs"