source: project/release/5/bitwise-utils/tags/1.1.3/srfi-60.scm @ 38927

Last change on this file since 38927 was 38600, checked in by Kon Lovett, 8 months ago

add srfi-60 module

File size: 1.3 KB
Line 
1
2(module srfi-60
3
4(;exports
5  logand bitwise-and logior bitwise-ior logxor bitwise-xor lognot
6  bitwise-not bitwise-if bitwise-merge logtest any-bits-set? logcount
7  bit-count integer-length log2-binary-factors first-set-bit logbit?
8  bit-set? copy-bit bit-field copy-bit-field ash arithmetic-shift
9  rotate-bit-field reverse-bit-field integer->list list->integer)
10
11(import scheme)
12(import (chicken base))
13(import (chicken bitwise))
14(import bitwise-utils)
15
16(define logand              bitwise-and)
17(define logior              bitwise-ior)
18(define logxor              bitwise-xor)
19(define lognot              bitwise-not)
20(define logtest             bitwise-any?)
21(define logcount            bitwise-count)
22(define logbit?             bitwise-nth?)
23(define ash                 arithmetic-shift)
24(define bit-field           bitwise-field)
25(define copy-bit-field      bitwise-field-copy)
26(define rotate-bit-field    bitwise-field-rotate)
27(define reverse-bit-field   bitwise-field-reverse)
28(define log2-binary-factors bitwise-first-set)
29(define (copy-bit k n b)    (bitwise-set-nth n k b))
30(define bitwise-if          bitwise-merge)
31(define any-bits-set?       bitwise-any?)
32(define bit-count           bitwise-count)
33(define first-set-bit       bitwise-first-set)
34(define bit-set?            bitwise-nth?)
35
36) ;module srfi-60
Note: See TracBrowser for help on using the repository browser.