You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Paul Taylor (Jira)" <ji...@apache.org> on 2020/09/26 19:43:00 UTC

[jira] [Commented] (ARROW-9982) [JS] IterableArrayLike should support map

    [ https://issues.apache.org/jira/browse/ARROW-9982?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17202664#comment-17202664 ] 

Paul Taylor commented on ARROW-9982:
------------------------------------

¯\_(ツ)_/¯

We're getting complaints about how large and un-tree-shakeable the library is already. I don't see a reason to add more unrelated functionality, especially when it already exists in other tree-shakeable libraries like Ix.

Otherwise, you can do `for...of` over any iterable type already, or have your own map implementation (no need to use Ix for something so simple)


{code:javascript}
function* map(source, project) { for (let x of source) yield project(x);  }

map(vector, (value) => console.log(value));
{code}


> [JS] IterableArrayLike should support map
> -----------------------------------------
>
>                 Key: ARROW-9982
>                 URL: https://issues.apache.org/jira/browse/ARROW-9982
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: JavaScript
>            Reporter: Dominik Moritz
>            Priority: Minor
>
> `table.toArray()` returns an `IterableArrayLike` and I would like to be able to `map` a function to it. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)