You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure which one is breaking the other, but the snippet below will repro the issue I'm having.
Essentially the curried function appears to be returning undefined when used inside compose. The function curry_unique_names returns [undefined] instead of the unique names as expected
// The following two functions work the samefunctionpluck_names(arr){return_.pluck(arr,'name');}varcurry_pluck_names=_.curry(_.pluck)(_,'name');// But these two do not :(varunique_names=_.compose(_.uniq,pluck_names);varcurry_unique_names=_.compose(_.uniq,curry_pluck_names);varnamed=[{name:'asdf'},{name:'qwer'},{name:'asdf'},{name:'qwer'}];console.log('Plucked names:\t',pluck_names(named));console.log('Plucked names w/ curry: ',curry_pluck_names(named));console.log('Unique names: \t',unique_names(named));console.log('Unique names with curry: \t',curry_unique_names(named));
The text was updated successfully, but these errors were encountered:
I'm not sure which one is breaking the other, but the snippet below will repro the issue I'm having.
Essentially the curried function appears to be returning undefined when used inside compose. The function
curry_unique_names
returns[undefined]
instead of the unique names as expectedThe text was updated successfully, but these errors were encountered: