bits.lisp 595 B

123456789
  1. (def! bit-dec (fn* [x] (
  2. (def! bits (unpack-bits x 256))
  3. (def! enforce-step-1 (fn* [b] (enforce (add-one-lc0 (sub-lc0 b) (add-lc1 b))))
  4. (map enforce-step-1 bits)
  5. ;; this can be improved like declaring the function before using like the example above
  6. (map (fn* [b] ((add-lc0 x) double-coeff-lc) bits)
  7. (enforce reset-coeff-lc sub-lc0 add-one-lc1)
  8. )))))