I\'m reading up about Java streams and discovering new things as I go along. One of the new things I found was the peek() function. Almost everything I\'ve read
The functional solution is to make account object immutable. So account.login() must return a new account object. This will mean that the map operation can be used for login instead of peek.