On 8 June 2014 18:57, Roelof Wobben <r.wobben / home.nl> wrote:

>
> Thanks,
>
> This works and I have studie this and the rest of this topic.
> If I understand everything right it works like this :
>
> one(add(one))
> function one will be executed.
> if fn = right
>   fn[1] will be add[1, one]
> add will  be executed
> (y)  { 1+ one}
> so one will be executed again.
> if fn = false
> 1
> (y) { 1+1}
> y = 2
>
> Do I understand everything well ?
>
>
Pretty much, but the execution order is the opposite. The inner-most
parameters have to be evaluated before they can be passed to the function,
so first is executed the inner `one`, then `add(...)`, then the outer
`one(...)`.

-- 
  Matthew Kerwin
  http://matthew.kerwin.net.au/