-
Notifications
You must be signed in to change notification settings - Fork 145
Closed
Description
I can see the idea behind allowing map to accept a value, and it's probably useful, but it's also confusing and breaks a long standing contract (the signature of a map function). The reason I'm here is because of this:
class Index {
lookupValue { ...pretend code... }
getValueAtTime(time) {
return this.lookupValue(time);
}
}
var index = new Index();
var stream = someOtherStream.map(index.getValueForTime);
This returns a stream of undefined
.
How long did it take you to see the error there? Took me hours.
Highland.value(val)
(there's maybe a better name) would clear this up and save me some sanity.