All pastes #261641 Raw Edit

Stuff

public text v1 · immutable
#261641 ·published 2006-11-29 18:59 UTC
rendered paste body
(define a
  (lambda (x)
    (if (list? x) ;if it's a list
        (if (eq? (car x) 'true);if the first thing it says is true
            (if  (eq? (car ( cdr x) ) 'and)         ;if second word = and
                 ( a ( cdr ( cdr x ) ) )          ;then return a(rest of string)
            (if (eq? (car ( cdr x) ) 'or)'true)
            ;'true
    (if (eq? x 'true) 'true  ;if it's a single element "true"
    (if (eq? x 'false) 'false ;if it's a single element "false"
        x
         )))))) 



(define a
  (lambda (x)
    (cond( (list? x)
           
           (cond ((eq? (car x) 'true)
                (cond (eq? car (cdr (x))'and)
                      a(cdr (cdr (x)))))
           
          
   (cond((eq? x 'true)'true)
         (eq? x 'false)'false)
    )
  )
) 


(define a
  (lambda (x)
    (cond( (list? x) ;"go into loop" [action here] )
           (cond( (eq? (car x) 'true );"first string = true
                  (cond( (eq? (car (cdr x)) 'and) a(cdr(cdr(x))))
                       )
                )
           )
           ((eq? x 'true) 'true)
           ((eq? x 'false) 'false)
           (else 'error!)
         )
    )
  )
) 

(define a
  (lambda (x)
    (cond  
      ((list? x)
           (cond ( (eq? (car x) 'true )
                    (cond
                      ((eq? (car x) 
                      ((eq? (car (cdr x)) 'and) (a(cdr(cdr x))))
                      
                     ))))
                 ((eq? x 'true) 'true)
                 ((eq? x 'false) 'false)
                 ((symbol? x) x)
           )
     )
)

(define a
  (lambda (x)
    (cond
      ((eq? x 'true) 'true)
      ((eq? x 'false) 'false)
      ((symbol? x) x)
      ((boolean? x) x)
      ((number? x) x)
      ((eq? (car x) 'true) (a x))
      ((eq? (car x) 'false) (a x))
      ((symbol? (car x)) (a x))
      ((boolean? (car x)) (a x))
      ((number? (car x)) (a x))
      ((eq? (car (cdr x)) 'and) (a (cdr(cdr x))))
      ((eq? (car x) 'true) )
    )
  )
)