state updating problem - Theo's Typesafe Cult