f(i,di) | = | di | if i is odd |
= | 3 × di | otherwise |
Suppose a procedure called f-upc computed
this version of f. Then:
(define check-upc (make-verifier f-upc 10))
(check-upc 038000145001) ⇒ #t
(check-upc 038000154001) ⇒ #f
Exercise 5.12: Write f-upc, make a verifier with it, and test it
on some groceries.