Advertisement
Guest User

Untitled

a guest
Dec 1st, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Racket 0.26 KB | None | 0 0
  1. #lang racket
  2.  
  3. (require racket/match)
  4.  
  5. (define (captcha sum items)
  6.   (match (first items)
  7.     [(second items) (captcha (+ sum (first items)) (list-tail items 1))]
  8.     [_ (captcha sum (list-tail items 1))]
  9.     )
  10.   )
  11.  
  12.  
  13.  
  14. (captcha 0 (string->list "1122"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement