-
Notifications
You must be signed in to change notification settings - Fork 52
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
lens that fails to focus raises no signals #117
Comments
Please provide a reproducible example |
Here you go: Test code:
run with result with no exception
|
This const r = Lens.fromProp<any>()("a")
.composeLens(Lens.fromProp<any>()("p"))
.composeTraversal(fromTraversable(array)<any>())
.composePrism(Prism.fromPredicate((child: any) => child.id === 4)) is not a |
Ok. I thought they were all called lens in a broader scope. Can I suggest to make an enhancement to raise a signal if the It would be nice for some use cases. Thanks. |
This could be bug or just a design feature that should be improved.
馃悰 Bug report
When use a lens to modify some data, if the path doesn't exist,
lens.modify
doesn't do anything but return the existing object.Is this the right behavior?
I think an exception should be thrown or use
either
to return a left value indicating a lens has failed to focus.The text was updated successfully, but these errors were encountered: