Skip to content

Don't require all parameters of callback function for .map, .filter, etc. #449

Closed
@vgrichina

Description

@vgrichina

Most of the time someone uses .map they don't want to handle all arguments, but only first one, i.e. write code like this:

items.map(it => it.name);

Is it possible to implement in AssemblyScript using e.g. trampoline function of proper type passed to .map which will just passthrough throwing out extra args? Ideally compiler should also be able to inline whole construction into single loop in case when passed function is constant.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions