{"action":"created","issue":{"url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/3888","labels_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/3888/labels{/name}","comments_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/3888/comments","events_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/3888/events","html_url":"https://github.com/HaxeFoundation/haxe/pull/3888","id":58183554,"number":3888,"title":"Usability improvements for haxe.ds.vector","user":{"login":"delahee","id":644444,"avatar_url":"https://avatars.githubusercontent.com/u/644444?v=3","gravatar_id":"","url":"https://api.github.com/users/delahee","html_url":"https://github.com/delahee","followers_url":"https://api.github.com/users/delahee/followers","following_url":"https://api.github.com/users/delahee/following{/other_user}","gists_url":"https://api.github.com/users/delahee/gists{/gist_id}","starred_url":"https://api.github.com/users/delahee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/delahee/subscriptions","organizations_url":"https://api.github.com/users/delahee/orgs","repos_url":"https://api.github.com/users/delahee/repos","events_url":"https://api.github.com/users/delahee/events{/privacy}","received_events_url":"https://api.github.com/users/delahee/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-19T09:17:08Z","updated_at":"2015-02-19T09:30:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/HaxeFoundation/haxe/pulls/3888","html_url":"https://github.com/HaxeFoundation/haxe/pull/3888","diff_url":"https://github.com/HaxeFoundation/haxe/pull/3888.diff","patch_url":"https://github.com/HaxeFoundation/haxe/pull/3888.patch"},"body":"Adds :\r\n\r\njoin\r\niter\r\nmap\r\ncopy\r\n\r\nFully tested on flash and windows targets.\r\n\r\nPR for issue : #3887\r\n\r\nTested on flash/cpp using \r\n```\r\ntrace(\"copy\");\r\n\t\t//copy\r\n\t\t{\r\n\t\t\tvar v = haxe.ds.Vector.fromArrayCopy([0, 1, 2, 3]);\r\n\t\t\tvar v0 = v.copy();\r\n\t\t\tv0[0] = 66;\r\n\t\t\ttrace(v);\r\n\t\t\ttrace(v0);\r\n\t\t}\r\n\t\t\r\n\t\ttrace(\"**iter**\");\r\n\t\t//iter\r\n\t\t{\r\n\t\t\tvar v = haxe.ds.Vector.fromArrayCopy([ {val:0} , {val:1} ]);\r\n\t\t\ttrace(v.join(\" \"));\r\n\t\t\tv.iter(function(e) e.val++);\r\n\t\t\ttrace(v.join(\" \"));\r\n\t\t}\r\n\t\t\r\n\t\ttrace(\"**map**\");\r\n\t\t//map\r\n\t\t{\r\n\t\t\tvar v0 = haxe.ds.Vector.fromArrayCopy([ {val:0} , {val:1} ]);\r\n\t\t\tvar v1 = v0.map(function(e) {\r\n\t\t\t\tvar c = Reflect.copy(e);\r\n\t\t\t\tc.val++;\r\n\t\t\t\treturn c;\r\n\t\t\t});\r\n\t\t\ttrace(v0.join(\" \"));\r\n\t\t\ttrace(v1.join(\" \"));\r\n\t\t}\r\n\t\t\r\n\t\ttrace(\"**sort**\");\r\n\t\t//sort\r\n\t\t{\r\n\t\t\tvar v = haxe.ds.Vector.fromArrayCopy([ 0, 1, 2 ]);\r\n\t\t\tv.sort( Reflect.compare );\r\n\t\t\ttrace( v.join(\" \") );\r\n\t\t\t\r\n\t\t\tvar v = haxe.ds.Vector.fromArrayCopy([ 2, 3, 4 ]);\r\n\t\t\tv.sort( function(e0, e1) return -Reflect.compare(e0, e1) );\r\n\t\t\ttrace( v.join(\" \") );\r\n\t\t}\r\n```"},"comment":{"url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/comments/75020974","html_url":"https://github.com/HaxeFoundation/haxe/pull/3888#issuecomment-75020974","issue_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/3888","id":75020974,"user":{"login":"Simn","id":634365,"avatar_url":"https://avatars.githubusercontent.com/u/634365?v=3","gravatar_id":"","url":"https://api.github.com/users/Simn","html_url":"https://github.com/Simn","followers_url":"https://api.github.com/users/Simn/followers","following_url":"https://api.github.com/users/Simn/following{/other_user}","gists_url":"https://api.github.com/users/Simn/gists{/gist_id}","starred_url":"https://api.github.com/users/Simn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Simn/subscriptions","organizations_url":"https://api.github.com/users/Simn/orgs","repos_url":"https://api.github.com/users/Simn/repos","events_url":"https://api.github.com/users/Simn/events{/privacy}","received_events_url":"https://api.github.com/users/Simn/received_events","type":"User","site_admin":false},"created_at":"2015-02-19T09:30:08Z","updated_at":"2015-02-19T09:30:08Z","body":"I'll merge this locally once the tests pass because I don't like having the tests in the commit message."}}