Suppose I want to calculate the following `f(f(...f(x)..)` .  

Basically many times function of itself.  

Currently I am doing the following to achieve this result (and to return all the intermediate steps):

```
def iterator(function, x, n=4):
    x = float(x)
    arr = []
    for i in range(n + 1):
        arr.append(x)
        x = function(x)

    return arr

def funcM(x):
    return x / 4 + 12

```

and then I am passing my function `funcM` as an argument:  

`print iterator(funcM, 100, 5)`.

There is nothing wrong with this approach, and calculations are correct.

But is there a way to do the same without defining function `funcM` ?  

May be passing lambda function as an argument to iterator function (Sorry if it does not make sense, I do not really know what lambda functions are).