-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Optics.Fold docs #426
Comments
IMO |
You're right that we should emphasise the relationship between I'm currently working on a workshop about |
(forall b. (a -> b -> b) -> b -> s -> b) -> Fold s a is IMHO simplest introduction form. Often quite optimal as well. As I hint in #427, our type for *Optics.Core> :t foldVL traverse
foldVL traverse :: Traversable t => Fold (t a) a works, but i'm not sure it should or shouldn't. ( |
These provide different performance characteristics. Last time I checked |
At the moment
Optics.Fold
usesfoldVL
as the canonical introduction form, and has lots of canonical elimination forms. I think it would be clearer to usefolding @[]
instead for the introduction form, andtoListOf
for the elimination form. This makes explicit the connection betweenFold s a
ands -> [a]
.The text was updated successfully, but these errors were encountered: