Advertisement
Guest User

Untitled

a guest
Jul 11th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scheme 0.27 KB | None | 0 0
  1. ;;count-multiples: aloi nat -> nat
  2. (define (count-multiples numbers n)
  3.   (local [(define (remainder-check numbers n)
  4.             (= (remainder (first numbers) n)))]
  5.     (filter remainder-check numbers)))
  6.    
  7. (check-expect (count-multiples (list 20 27 -10 2 11 0) 10) 3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement