3 variants of state modelling attempted. use lambda instead of defun to model the bank account object in p.223