Some work for University of Cambridge CompSci Tripos, Part IA