Skip to content
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

Small issue on subtraction #11

Closed
takanuva opened this issue Dec 27, 2018 · 2 comments
Closed

Small issue on subtraction #11

takanuva opened this issue Dec 27, 2018 · 2 comments

Comments

@takanuva
Copy link

takanuva commented Dec 27, 2018

The operator -= isn't working properly (should be easy to reproduce). On lens.ml, line 173:

let (-=) l v = _modify ((-) v) l

(This probably affects line 183 as well.)

The value being subtracted (v) is being used on the left position on the subtraction, giving an incorrect result. Could be changed to, e.g., ((+) (-v)) or (fun x -> x - v).

@pdonadeo
Copy link
Owner

Sorry for the delay, I missed the notification.

I'll fix and release ASAP.

@pdonadeo
Copy link
Owner

@takanuva 1.2.2 just released and I sent the pull request to the OPAM repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants