How can a time function exist in functional programming?
Yes and no. Different functional programming languages solve them differently. In Haskell (a very pure one) all this stuff has to happen in something called the I/O Monad – see here. You can think of it as getting another input (and output) into your function (the world-state) or easier as a place where “impureness” like … Read more