Bob Ippolito wrote:
> If you want a copy, use merge(obj).
Thanks.
> I never really had any use cases for values without items. Do you have any?
The primary one is when using an object as a set. The keys are some
unique string derived from the object, but the actual objects are the
values.
>> On 8/19/06, Chris Nokleberg wrote:
>> 3) Similarly, a way to reverse the effect of Base.items is useful.
> This we could use. I don't know about the extra map functions though.
Sounds good. It might also be useful to have a method to build an
object from separate keys and values arrays (zipobj?). mapValues could
then also be written as
function mapValues(fn, obj) {
return zipobj(keys(obj), map(fn, values(obj)));
}
Perhaps building an object from an array with alternating keys and
values would be more pythony (if python is like perl), but this seems a
little more useful.
Chris
p.s. the link to "zip" from "map" in the docs goes nowhere
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/mochikit
-~----------~----~----~----~------~----~------~--~---