Tech article

Push Ifs Up and Fors Down: The Idiom, Its Algebra, and Its Limits

No preview is available. Read the original article for the full story.

Hacker News | Oct 7, 2026 | speckx

Automated excerpt

Since keep p . f == fmap f . keep (p . f): == catMaybes . map (keep p) . map f == catMaybes . map (keep p . f) == catMaybes . map (fmap f . keep (p . f)) == catMaybes . map (fmap f) . map (keep (p . f)) == map f . catMaybes . map (keep (p . f)) -- naturality of catMaybes == map f . filter (p . f) Notice that the right-hand side is not automatically cheaper: filter (p . f) still computes f for every element in order to test it.

Selected automatically from source text; not independently written or fact-checked. Read the original for full context.

Read the original article

Read next

AI briefing: recent picks

More tech news