Skip to content

Instantly share code, notes, and snippets.

@kyptin
Created February 17, 2020 15:20
Show Gist options
  • Save kyptin/07fded270a3b5b5cdc6b0c0e58e495e4 to your computer and use it in GitHub Desktop.
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
;; 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