Thanks to visit codestin.com
Credit goes to github.com

Skip to content

pass keys to lume.map function #38

@solarized-fox

Description

@solarized-fox

I'm currently in the process of swapping my home-brewed util library for lume. one sticking point is that my version of map passes the value and key to the mapper function, which means I have to modify lume a bit. it should be as simple as changing rtn[k] = f(v) to rtn[k] = f(v, k). I seriously doubt that this would break any existing code (aren't dynamic function arities wonderful?) so if folks think it's a good idea I can make a pull request for this, might also propagate this change to some of the other higher order functions like filter while I'm at it

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions