( (x,y) -> x+y ).( [ (1,2), (3,4) ] )

No. But an anonymous function of a tuple can be applied to a vector of tuples as follows:

jula> (((x, y),) -> x + y).([(1, 2), (3, 4)])
2-element Vector{Int64}:
 3
 7

This is appoximately equivalent to

julia> f((x, y)) = x + y
julia> f.([(1, 2), (3, 4)])
2-element Vector{Int64}:
 3
 7

Note that the comma immediately after (x, y) is not necessary in this case, but it is necessary in the case of the anonymous function above.

You can also get the same result with

julia> (t -> +(t...)).([(1, 2), (3, 4)])
2-element Vector{Int64}:
 3
 7

Edit: A few minutes late; Julia’s people are too quick to answer! :blush:

2 Likes