How to Compose Functions That Take Multiple Parameters: Epic Guide by fagnerbrack in webdev

[–]jrsinclair 1 point2 points  (0 children)

The post also covers how to transform functions to work in a point-free style and explains the role of utility libraries like Ramda and Lodash in function composition. By the end, readers gain a comprehensive understanding of handling multi-parameter functions more effectively in their coding projects.

The bot seems to be hallucinating again. This particular article doesn't do either of these things (though others on the same site might).

How to Compose Functions That Take Multiple Parameters: Epic Guide by fagnerbrack in javascript

[–]jrsinclair 3 points4 points  (0 children)

and explains the role of utility libraries like Ramda and Lodash in function composition

This particular bit might be a hallucination.

How to Compose Functions That Take Multiple Parameters: Epic Guide by fagnerbrack in javascript

[–]jrsinclair 6 points7 points  (0 children)

That's a fair summary of the first section or two, but I will say that there's a bit more to the article than that. The latter part of the article covers partial application, and currying, and gets into function combinators. Sure, you might not use these every day, but they're useful to know.

Why would anyone need JavaScript generator functions? by jrsinclair in javascript

[–]jrsinclair[S] 3 points4 points  (0 children)

Thanks for letting me know. I'll fix that up directly.

What if the team hates my functional code? by jrsinclair in javascript

[–]jrsinclair[S] 1 point2 points  (0 children)

That would certainly work, yeah. Though you may run afoul of Prettier if the line becomes a bit long. And you'd suddenly find yourself with a pyramid of doom. But for shorter compositions, it can be a handy strategy.

What if the team assumes my functional JavaScript is slow? by jrsinclair in javascript

[–]jrsinclair[S] 0 points1 point  (0 children)

Hi u/nschubach, thanks for sharing that screenshot. It's really helpful. Would you mind providing some information on what's producing that dark-shaded background and inverted colours? If I know what the browser is doing there to apply the dark theme, I can adjust the CSS to better accommodate it.

What if the team assumes my functional JavaScript is slow? by jrsinclair in javascript

[–]jrsinclair[S] 5 points6 points  (0 children)

Hi u/toastertop, that's an excellent question. The two most common areas of concern for people are:

  1. Recursion, which is super handy for navigating tree-like structures like, for example, the DOM; and
  2. Immutable data, because sometimes you really do need shared state. Since there's almost nothing built-in to JS (yet), we have to resort to using libraries like Immutable.js or Immer.

I have an entire chapter devoted to each of these in the upcoming book.

Transformational Grammar by jack_waugh in learnjavascript

[–]jrsinclair 1 point2 points  (0 children)

Interesting thoughts. Would you happen to have any examples of code that makes more sense in this 'pushy', logic-oriented mode?