Skip to content

Instantly share code, notes, and snippets.

@rigibun
Created May 11, 2014 15:04
Show Gist options
  • Save rigibun/d7268719c45af1074867 to your computer and use it in GitHub Desktop.
Save rigibun/d7268719c45af1074867 to your computer and use it in GitHub Desktop.
(define (accum x)
(lambda (i)
(if (= i -1)
x
(accum (+ x i))
)))
(define (even>odd? a b c d e)
(if (> ((((((accum
(if (even? a) 1 0))
(if (even? b) 1 0))
(if (even? c) 1 0))
(if (even? d) 1 0))
(if (even? e) 1 0))
-1)
2)
#t
#f))
(print (even>odd? 2 2 2 1 1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment