Advertisement
Guest User

Untitled

a guest
Dec 5th, 2019
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. (defun read-bit-vector (stream ch)
  2. (let* ((size (read stream))
  3. (bits (read stream))
  4. (vector (make-array size :element-type 'bit :initial-element 0)))
  5. (dolist (bit bits vector)
  6. (setf (aref vector bit) 1))))
  7. (set-macro-character #\𝔟 'read-bit-vector)
  8. (bit-and 𝔟10(1 2 3) 𝔟10(3 5 6))
  9. --> #*0001000000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement