Skip to content

Instantly share code, notes, and snippets.

@kyptin
Created February 12, 2020 15:24
Show Gist options
  • Save kyptin/126835260d4bd5e674797c82fe1afb81 to your computer and use it in GitHub Desktop.
Save kyptin/126835260d4bd5e674797c82fe1afb81 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
;; To write tests for this function, what behaviors would you list?
(defn summation
([xs] (summation identity xs))
([f xs] (reduce + 0 (map f xs))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment