summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo <hugo.hornquist@gmail.com>2016-05-09 18:35:49 +0200
committerHugo <hugo.hornquist@gmail.com>2016-05-09 18:35:49 +0200
commitf6b3d28ba49aebd644f1849a78a98eb28655469f (patch)
treef1a17987b0999bab95cc6ee641ec0cda6a589977
parentnow returns #f if given an invalid expression (diff)
downloadmath-parse-f6b3d28ba49aebd644f1849a78a98eb28655469f.tar.gz
math-parse-f6b3d28ba49aebd644f1849a78a98eb28655469f.tar.xz
added small comment about what an invalid expression is
-rw-r--r--math-parser.scm2
1 files changed, 2 insertions, 0 deletions
diff --git a/math-parser.scm b/math-parser.scm
index b9ef4b9..1006926 100644
--- a/math-parser.scm
+++ b/math-parser.scm
@@ -61,5 +61,7 @@
; in order, from outermost to innermost.
(let* ((expr (string->list str))
(trace ((create-trace expr '(#\+ #\- #\* #\/ #\^)) expr)))
+ ; If any operator is more than once in a row in the input, then a element becomes false
+ ; This makes the function return false if any of the inputs are false
(if (contains-false? trace)
#f trace)))