Skip to content

Instantly share code, notes, and snippets.

@dmastylo
Last active July 29, 2017 04:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmastylo/10030657 to your computer and use it in GitHub Desktop.
Save dmastylo/10030657 to your computer and use it in GitHub Desktop.
scheme
(define (func (lambda (n cnt)
(if (= n 1)
cnt
((func (quotient (+ n 1) 2) (+ 1 cnt)))
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment