m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/index.js
diff options
context:
space:
mode:
authorMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2017-08-30 17:46:07 -0400
committerMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2017-08-30 17:46:07 -0400
commit5087cde4825d91112cad565c68d81296359cf4d8 (patch)
treead9dd27b079b1f41aa07c66f4f401c645241e25c /index.js
parent94bbae437d98c103d1dae09be9949bcf26e8bcf9 (diff)
Implement multiplication
Diffstat (limited to 'index.js')
-rw-r--r--index.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/index.js b/index.js
index 1851a77..9a4534b 100644
--- a/index.js
+++ b/index.js
@@ -27,6 +27,8 @@ const interpret = tree => {
return D.add(interpret(tree.left), interpret(tree.right))
case 'subtract':
return D.subtract(interpret(tree.left), interpret(tree.right))
+ case 'multiply':
+ return D.multiply(interpret(tree.left), interpret(tree.right))
case 'negative':
return D.negative(interpret(tree.value))
case 'bonusAdd':