Created
October 24, 2016 02:47
-
-
Save ethagnawl/52b01111172a0d685c603d8784fef6e1 to your computer and use it in GitHub Desktop.
racket compose
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 (count-zeros lst) | |
((compose length | |
(curry filter zero?) | |
flatten) | |
lst)) | |
(count-zeros '(0 0 (1 (1 (0 0) 0)) (1 0 0))) ;; 7 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment