Saga of a Single Function by Edgar Marukyan (Eng) | JSConfAM19
summary
Argues that the single function is the fundamental unit of JavaScript code and shows concrete changes: rewrite three-argument routines into one-argument functions via currying and object bundling, replace boolean flags by splitting into two functions, factor callbacks out of maps into named helpers, and separate a tiny dirty edge that touches the DOM from a large pure pipeline. Demonstrates composition with compose, Express-style middleware and promise chains, claims pure functions are cacheable and testable and notes this approach trades a bit of raw speed for long-term maintainability.
AI-written summary · about
chapters (19)
- 0:00Introduction
- 3:47Agenda
- 4:10Who is this for
- 5:14Function names
- 10:46Ideal number of arguments
- 12:49Types of arguments
- 14:14Linear independence
- 15:39Purity
- 17:36Cashable
- 18:36Self Documenting
- 19:18Other Advantages
- 20:36SemiPure Function
- 21:21Composition
- 23:42Functions MapReduce
- 25:05Recommendation
- 25:24Code Example
- 26:09Quick Examples
- 26:33Utility Functions
- 27:13Conclusion
related talks
49mA Skeptics guide to functional style javascript
20mFunctional JavaScript
01h 03mFunctional Programming in JS: What? Why? How?
45mA Skeptics guide to functional style javascript
35mFunctional programming and curry cooking in JS
39mFun with Functional JavaScript
34mFunctional JavaScript for everyone
12mAn introduction to functional programming
