swannodette / mori

ClojureScript's persistent data structures and supporting API from the comfort of vanilla JavaScript

Home Page:http://swannodette.github.io/mori

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Request: mapValues function for map-like objects

dan-mcdonald opened this issue · comments

A function similar to scala's AbstractMap.mapValues would be useful, e.g.:

var m = mori.hashMap("foo", 1, "bar", 2);
mori.mapValues(mori.inc); // => {"foo" 2, "bar" 3}

Mori is just an export of some functions from ClojureScript core. Since ClojureScript doesn't have such function, it's unlikely that it will appear in mori.