Renaming the stateFold with key function and explicitly using a strict fold