HackerTube 中文?

Hey Underscore, You're Doing It Wrong!

InfoQYouTube ↗

Caption notes

Brian Lonsdorf uses Underscore to discuss how argument order affects composition in a JavaScript library. In his odd-number example, he fixes the divisor first, then gives the resulting predicate to a filter to build a new function waiting for an array. A word-count example illustrates composition by splitting a string on spaces and then taking the length of the result. Finally, he uses Maybe to show how map applies the same transformation when a value is present and preserves the missing case otherwise.

Archived captions (transcription method unspecified) ↗
Original passages · 2
keeps returning a new function until it gets all its arguments
Hey Underscore, You're Doing It Wrong! · ▶ 2:43–2:54
passing the output of one function into the input of the next
Hey Underscore, You're Doing It Wrong! · ▶ 11:36–11:42

Hacker News comments

View original on HN ↗