summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--math-parser.scm7
1 files changed, 7 insertions, 0 deletions
diff --git a/math-parser.scm b/math-parser.scm
index 1006926..826c9bd 100644
--- a/math-parser.scm
+++ b/math-parser.scm
@@ -1,3 +1,10 @@
+(use-modules (srfi srfi-1))
+
+(define (contains-false? list)
+ (fold (lambda (item prev)
+ (if prev #t (eqv? item #f)))
+ #f list))
+
; parses a function written in mathematical notation to lisp notation
; currently handles (+ - * / ^). It does respect the order of operations
(define (parse-math str)