Here the classical example would be the random function or a function which computes the number of times that it has been used. The way that we achieve this in functional languages is essentially by creating local variables. And because of the private nature of local variables then these variables can only be accessed from within the function. As an example of all this I have discussed a general problem. We all go for some originality and so this time I decided to illustrate several different ways by which you can see this model, the fixed point operator in Standard ML. We shall see first the trivial solutions and then we will see some more sophisticated solutions, which in fact also have some theoretical relevance. Let's look at the first of these solutions. This is the trivial solution. | ![]() |