diff --git a/MaruseacMihai_341C3.scm b/MaruseacMihai_341C3.scm index d523f7a..5ae0ef4 100644 --- a/MaruseacMihai_341C3.scm +++ b/MaruseacMihai_341C3.scm @@ -7,14 +7,17 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; GLOBAL AUXILIARY FUNCS ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +; first, convert to Haskel-ish notations (require srfi/1) (define (oldtake l n) (take l n)) (define (olddrop l n) (drop l n)) + +; some auxiliary functions, used below (define (nub-aux l seen) (if (null? l) seen (if (elem? (car l) seen) (nub-aux (cdr l) seen) (nub-aux (cdr l) (cons (car l) seen))))) (define (andList l) (foldl (lambda (x y) (and x y)) #t l)) (define (orList l) (foldl (lambda (x y) (and x y)) #f l)) (define (stringCompare s1 s2) (string