Hacker News new | past | comments | ask | show | jobs | submit login

That's the nicest I know as well. You could use `mapped` instead of `_Just` to make it more generic

    nested ^? foo . mapped . bar . mapped . baz . mapped
Which is also a bit closer to the nature of `>=>` chaining. I actually really like the _Just descent since it makes some of the failure modes for this lens very explicit.

And then it should always be said that the lens has setter properties that the `>=>` chain does not.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: