Higher Order Function Question

Happi <>
Thu May 16 09:45:12 CEST 2002


Thomas Arts wrote:
> ps. You don't need to use three apply's, I guess you want to
> recursively apply disjoin on the rest of the functions:
> 
> fun(Args) ->
>    apply(Fn, [Args]) orelse
>       apply(apply(disjoin, [FnTail]), [Args]) 
> end;
> 
> is equal to:
> 
> fun(Args) ->
>    apply(Fn,[Args]) orelse
>      apply(disjoin(FnTail),[Args])
> end;
> 

wich is equal to:
  fun(Args) ->
      (Fn)(Args) orelse (disjoin(FnTail))(Args)
  end

Perhaps you wanted:
 fun(Args) ->
    apply(Fn,Args) orelse
      apply(disjoin(FnTail),Args)
 end

/Erik
Praeterea censeo "0xCA" scribere Erlang posse.






More information about the erlang-questions mailing list