We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Consider the following Lea session: {{{ >>> (die1.times(2)) + die1 3 : 1/216 4 : 3/216 5 : 6/216 6 : 10/216 7 : 15/216 8 : 21/216 9 : 25/216 10 : 27/216 11 : 27/216 12 : 25/216 13 : 21/216 14 : 15/216 15 : 10/216 16 : 6/216 17 : 3/216 18 : 1/216 >>> die1 + (die1.times(2)) 3 : 1/6 6 : 1/6 9 : 1/6 12 : 1/6 15 : 1/6 18 : 1/6 }}} Both results should be the same! The second result can be explained by the binding mechanism. A workaround is to clone _die1_ before doing the _times(2)_: {{{ >>> die1 + (die1.clone().times(2)) 3 : 1/216 4 : 3/216 5 : 6/216 6 : 10/216 7 : 15/216 8 : 21/216 9 : 25/216 10 : 27/216 11 : 27/216 12 : 25/216 }}} Resolution: change the _times_ method to perform a clone of self.
Original issue reported on code.google.com by pde@n-side.com on 14 Oct 2014 at 8:47
pde@n-side.com
The text was updated successfully, but these errors were encountered:
Original comment by pde@n-side.com on 13 Nov 2014 at 9:28
Sorry, something went wrong.
Fixed in Lea 2
Original comment by pde@n-side.com on 25 Dec 2014 at 11:07
No branches or pull requests
Original issue reported on code.google.com by
pde@n-side.com
on 14 Oct 2014 at 8:47The text was updated successfully, but these errors were encountered: