I've slightly changed the handle function from stacker to allow extended operations like - and / while keeping RPN notation. Simply extending the original implementation with - and / was giving incorrect results because of the way the arguments taken from the stack were used when evaluating the current operation.
Also, added an example of extending stacker with - and /. Added two extra tests.
Thanks,
Jean
Hello Matthew,
I've slightly changed the handle function from stacker to allow extended operations like - and / while keeping RPN notation. Simply extending the original implementation with - and / was giving incorrect results because of the way the arguments taken from the stack were used when evaluating the current operation.
Also, added an example of extending stacker with - and /. Added two extra tests.
Thanks,
Jean
This pull request cannot be reopened because the branch was deleted.
Hello Matthew,
I've slightly changed the handle function from stacker to allow extended operations like - and / while keeping RPN notation. Simply extending the original implementation with - and / was giving incorrect results because of the way the arguments taken from the stack were used when evaluating the current operation.
Also, added an example of extending stacker with - and /. Added two extra tests.
Thanks,
Jean
Step 1:
From your project repository, check out a new branch and test the changes.Step 2:
Merge the changes and update on Gitea.