my very unmotivated attempt at exercises for functionals chapter