On Sun, Jul 17, 2016 at 9:00 AM, Jesse Jaanila <jessejaan...@gmail.com> wrote: > Hi, > > I'm trying to map a array of tuples. > > julia> map((x,y) -> x+y, [(1,1),(2,2)]) > ERROR: wrong number of arguments > in anonymous at none:1 > in map at abstractarray.jl:1305 > > This doesn't work. I expect the result to be > [2,4] > > Can this kind of mapping be achieved or the map function only defined for > one dimensional domain i.e. Array{T, 1}?
map((v) -> (x,y = v; x+y), [(1,1),(2,2)]) >