News for hackers. Stuff that matters.
Re:Concatenation is composition by tantalor on Monday July 18, 2022 @09:09AM (#32137901)
The fact that you originally swapped /f/ and /g/ in your comment then edited it to fix there mistake is perfect example of why this is a dangerous and bug prone approach to writing programs.
Re:Concatenation is composition by nine_k on Monday July 18, 2022 @09:22AM (#32138048)
It's just f and g being poor names, also on keys next to each other. The circle is a good symbol for a whiteboard, but it's a poor identifier.

Normally you write composition like readFile().then(stripComments).then(sort).then(takeFirst), or compose using shell pipes.

Composition is so widespread and so trivial-looking that it's even easy to miss.

Re:Concatenation is composition by mjburgess on Monday July 18, 2022 @09:17AM (#32137982)
Strange take -- the whole basis of FP is dangerous and bug-prone?

Unlike the imperative `;`, which sequences commands in an absolutely obvious way, right?