DEV Community

loading...

Discussion on: The Trials and Tribulations. A Fool's Guide To Writing Functional JS (Part 4)

Collapse
fa7ad profile image
Fahad Hossain Author • Edited

Sure, I never said you couldn't use variables. Which of the problems do you think can be solved by using variables? I never said anything about having sensible names, are you confusing this post with some other post?

Collapse
pentacular profile image
pentacular

Since you're suggesting point-free composition it might be a good idea to also consider the alternative.

const deduplicated = deduplicate(data);
const inverted = invert(deduplicated);
...

Each approach has its strengths and weaknesses, after all.

Forem Open with the Forem app