I have a function 

```
// Will perform a given function twice
let twice f = (fun x -> f (f x))

```

Then I have something like.

```
// Take x add 1
let f x = x+1

```

Depending on how I call twice it behaves differently do to left associativity. 

```
(twice (twice (twice (twice f)))) 0;; // Outputs 16
twice twice twice twice f 0;; // Outputs 65536

```

If I add another twice my program does a StackOverflow, but so far it seems to behave without a pattern, which drives me crazy.

Let k be the number of times `twice` is called.

Un-curried is 2^k to get the answer.

Curried is extremely odd. **Hypothesis 1:** When the number of calls is less than 4 it looks like 2^(2^(k-1)), but when k is 4 it behaves like 2^(2^k)

Does anyone see the pattern? Or can you run it past k = 4 to prove it?