Dominik,
It's perhaps also worthwhile to note that we don't really know what you
want to achieve in a broader sense--this might be a case of an XY problem,
where we can tell you how to do X really well, but ultimately given more
context it might be far better to do Y. (Though I usually enjoy the
challenge of making X good, as well).
Patrick
On Wednesday, December 18, 2013 8:14:43 AM UTC-6, Dominik Holenstein wrote:
>
> Patrick,
>
> Many thanks for your replies!
> Considering your examples and explanations I admit that my approach is not
> appropriate to what I want to achieve.
>
> Dominik
>
>
> Am Mittwoch, 18. Dezember 2013 15:09:26 UTC+1 schrieb Patrick O'Leary:
>>
>> On Wednesday, December 18, 2013 8:06:33 AM UTC-6, Patrick O'Leary wrote:
>>>
>>> ...
>>>
>>
>>
>>> julia> feval(funs, x) = foldl(|>, {x; funs...})
>>> feval (generic function with 2 methods)
>>>
>>> julia> feval([f g], 3)
>>> 20.0
>>>
>>
>> And the single-function case is just an alias of `apply`:
>>
>> julia> feval(fun::Function, x) = apply(fun, x)
>> feval (generic function with 3 methods)
>>
>> julia> feval(f, 3)
>> 8
>>
>> Patrick
>>
>>