fpinscala ex 7.1 - 7.6