functionalcomparekeys.py contains the same functionality as comparekeys.py but uses a more functional mode to track state. It is closer to davidsarah's style (e.g. in signup.py) than comparekeys.py was.