simpler bitwise-not

This commit is contained in:
Alex Shinn 2010-12-29 15:44:12 +09:00
parent ce2bf8ce77
commit 74185fbe11

View file

@ -2,7 +2,7 @@
;; Copyright (c) 2009 Alex Shinn. All rights reserved. ;; Copyright (c) 2009 Alex Shinn. All rights reserved.
;; BSD-style license: http://synthcode.com/license.txt ;; BSD-style license: http://synthcode.com/license.txt
(define (bitwise-not i) (- (+ i 1))) (define (bitwise-not i) (- -1 i))
(define (bitwise-complement f) (lambda args (bitwise-not (apply f args)))) (define (bitwise-complement f) (lambda args (bitwise-not (apply f args))))