Created
February 17, 2020 15:20
-
-
Save kyptin/07fded270a3b5b5cdc6b0c0e58e495e4 to your computer and use it in GitHub Desktop.
Code for an in-class quiz (COMP 590/spring 2020) for listing behaviors of a function assuming isolated tests
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
;; To write tests for this function, what behaviors would you list? | |
(defn pascal-row | |
"Return a seq of the numbers in the n-th row of Pascal's triangle (where n=0 is | |
the first row)." | |
[n] | |
(for [i (range (inc n))] | |
(combinations n i))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment