↓ Skip to main content

Types and Functions 3: Composing

·105 words

Then we get at Chapter 05: Composing and I really don’t understand the need to faff around so much when it comes to such a mathematically simple subject.

Composing is really easy, it’s just that programming languages make it hard. Especially if you look at this:

const compose = (...fns) => (...args) => fns.reduceRight((res, fn) => [fn.call(null, ...res)], args)[0];

That curried function is left unexplained and I’m still not sure I can read it.

I’m documenting this because every chapter is spawning off one too many bunny trails for my taste. That also makes it clear how learning functional programming is a reclusive undergrad’s game.

Alper Cugun
Author
Alper Cugun

Related

·34 words
Such a well-written and cogent argument by Dave Mangot about how it definitely does matter whether you choose to deploy on Fridays or not and also that that choice is fully your own.

Figma’s multiplayer support is fantastic and something similar should be a part of every creative application. Now they’ve also written a very understandable high-level overview of their implementation (with CRDTs).