Iam trying to build a macro for chaining operations which works like follow:
@chain vec |> map(x -> x^2) |> reduce(+, 0) |> first(6)
The macro should be able to paste the result of the evaluation of a chain element into the next expression on the position where the data types matches the first time. Iam not sure if this is possible because
I need to evaluate a part of the expression to get its type and find a method signature for the function which matches.
Does someone have an idea how to do that?
Thanks a lot for your help.