fork download
  1. ; odd appearances
  2.  
  3. (define (fold-left op base xs)
  4. (if (null? xs)
  5. base
  6. (fold-left op (op base (car xs)) (cdr xs))))
  7.  
  8. (define (odd-appearances xs) (fold-left logxor 0 xs))
  9.  
  10. (display (odd-appearances '(4 3 6 2 6 4 2 3 4 3 3)))
Success #stdin #stdout 0s 42784KB
stdin
Standard input is empty
stdout
4