summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo <hugo.hornquist@gmail.com>2016-04-26 23:15:43 +0200
committerHugo <hugo.hornquist@gmail.com>2016-04-26 23:15:43 +0200
commitb7a8f6cb30f5a9d324c51787557e8179d64d789c (patch)
tree5fb557e8996f684d991a8d06947d4b492759796c
parentimproved variable names in full-parse (diff)
downloadmath-parse-b7a8f6cb30f5a9d324c51787557e8179d64d789c.tar.gz
math-parse-b7a8f6cb30f5a9d324c51787557e8179d64d789c.tar.xz
added more reverse, works fine except top level which is backwards
-rw-r--r--full-parse.rkt4
1 files changed, 2 insertions, 2 deletions
diff --git a/full-parse.rkt b/full-parse.rkt
index cec14e2..cb1d38b 100644
--- a/full-parse.rkt
+++ b/full-parse.rkt
@@ -31,9 +31,9 @@
[(null? remaining-expression)
(reverse (add-operation-to-list current-term other-terms))]
[(eqv? (car remaining-expression) operator)
- (inner '() (add-operation-to-list current-term other-terms) (cdr remaining-expression))]
+ (reverse (inner '() (add-operation-to-list current-term other-terms) (cdr remaining-expression)))]
[else
- (inner (cons (car remaining-expression) current-term) other-terms (cdr remaining-expression))]))
+ (reverse (inner (cons (car remaining-expression) current-term) other-terms (cdr remaining-expression)))]))
(if (not (contains operator expr))
(next-operation expr)