News for hackers. Stuff that matters.
Re:Lenses by ParetoOptimal on Monday June 27, 2022 @09:29AM (#31894326)
> `sumOf (folded . folded)` does have some advantages in working for lists of other types but I question how often you would reuse such a function for different types the first place.

Just remembered another refactor that comes up a lot for me:

Refactoring `[a]` to `NonEmpty a`. A lot of times this tightens your code up, but i find if the call chain is monomorphic to list most won't bother with the refactor.

So I like lens for pushing away from that level of monomorphism that is resistant to better architecture.

There are no comments on this comment yet.