exec([fun fun1/3, fun fun2/4, fun fun3/1], [Arg1, Arg2, Arg2]).
fun1(Arg1, Arg2, Arg3) ->
P = proplists:get_value(p, Arg1),
{ok, [P, Arg1, Arg2, Arg3]}.
fun2(P, Arg1, Arg2, Arg3) ->
do_stuff(P, Arg1, Arg2),
{ok, [Arg3]}.
fun3(Arg3) -> {ok, thanks}.
Exec is typically implemented something like this
exec([F], Args) ->
erlang:apply(F, Args);
exec([F|Rest], Args) ->
case erlang:apply(F, Args) of
ok -> exec(Rest, Args);
{ok, Args1} -> exec(Rest, Args1);
{error, Error} -> {error, Error}
end.