{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/13942","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/13942/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/13942/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/13942/events","html_url":"https://github.com/JuliaLang/julia/issues/13942","id":116228011,"number":13942,"title":"Base.unzip()","user":{"login":"ZacCranko","id":7624301,"avatar_url":"https://avatars.githubusercontent.com/u/7624301?v=3","gravatar_id":"","url":"https://api.github.com/users/ZacCranko","html_url":"https://github.com/ZacCranko","followers_url":"https://api.github.com/users/ZacCranko/followers","following_url":"https://api.github.com/users/ZacCranko/following{/other_user}","gists_url":"https://api.github.com/users/ZacCranko/gists{/gist_id}","starred_url":"https://api.github.com/users/ZacCranko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZacCranko/subscriptions","organizations_url":"https://api.github.com/users/ZacCranko/orgs","repos_url":"https://api.github.com/users/ZacCranko/repos","events_url":"https://api.github.com/users/ZacCranko/events{/privacy}","received_events_url":"https://api.github.com/users/ZacCranko/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-10T23:40:23Z","updated_at":"2015-11-11T05:16:32Z","closed_at":null,"body":"Hi there,\r\n\r\napologies if this has already been addressed somewhere, but is there a reason that there is no `unzip()` function in Base?\r\n\r\nIdeally this would be a function that would take a `Vector{Tuple{ ... }}` and return a `Tuple{Vector, ..., Vector}` for output. E.g.\r\n```\r\njulia> v = [(1,\"a\",:meow), (2,\"b\",:woof), (3,\"c\",:doh!)]; unzip(v)\r\n([1,2,3],ASCIIString[\"a\",\"b\",\"c\"],[:meow,:woof,:doh!])\r\n```\r\n\r\nA naive implementation might be something like\r\n```julia\r\nfunction unzip(input::Vector)\r\n    n = length(input)\r\n    types  = map(typeof, first(input))\r\n    output = map(T->Vector{T}(n), types)\r\n\r\n    for i = 1:n\r\n       @inbounds for (j, x) in enumerate(input[i])\r\n           (output[j])[i] = x\r\n       end\r\n    end\r\n    return (output...)\r\nend\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/155669822","html_url":"https://github.com/JuliaLang/julia/issues/13942#issuecomment-155669822","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/13942","id":155669822,"user":{"login":"yuyichao","id":712232,"avatar_url":"https://avatars.githubusercontent.com/u/712232?v=3","gravatar_id":"","url":"https://api.github.com/users/yuyichao","html_url":"https://github.com/yuyichao","followers_url":"https://api.github.com/users/yuyichao/followers","following_url":"https://api.github.com/users/yuyichao/following{/other_user}","gists_url":"https://api.github.com/users/yuyichao/gists{/gist_id}","starred_url":"https://api.github.com/users/yuyichao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuyichao/subscriptions","organizations_url":"https://api.github.com/users/yuyichao/orgs","repos_url":"https://api.github.com/users/yuyichao/repos","events_url":"https://api.github.com/users/yuyichao/events{/privacy}","received_events_url":"https://api.github.com/users/yuyichao/received_events","type":"User","site_admin":false},"created_at":"2015-11-11T05:16:32Z","updated_at":"2015-11-11T05:16:32Z","body":"[No](https://github.com/JuliaLang/julia/issues/13930#issuecomment-155142306)"}}