good luck with that. there is a reason that no one uses purely functional programming languages for anything. any functional programming that people actually use has some way to define a state.