Created
February 18, 2013 14:44
-
-
Save briandk/4977908 to your computer and use it in GitHub Desktop.
A quick test of a function to find the length of a list in Racket.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define (my-length lst) | |
(cond | |
[(empty? lst) 0] | |
[else (+ 1 (my-length (rest lst)))])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment