DEV Community

Discussion on: Know When to Fold 'Em

Collapse
 
jvanbruegge profile image
Jan van Brügge

I don't think the full pointfree version of myAny is less clutter. My personal heuristic about when an expression has been ETA reduced too much is when I have partial applied compose. So I would use the version before with the f and without the flip.

Sometimes I define myself the blackbird, because this allows me to not have partial applied compose:

(...) = (.) . (.)
Collapse
 
deciduously profile image
Ben Lovy

That makes a lot of sense - I get the feeling that my code is getting away from me sometimes but it's tempting to jump on those reductions when you see them. It does take a bit longer looking at it to get at what it's doing, I should give your way a shot for a while.

I like the blackbird! Thanks for the idea.