This file contains hidden or 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
(ns codelesson.week1 | |
(:require [clojure.math.combinatorics :as mc])) | |
(defn add-up [coeffs terms] | |
"ax + by + cz + ... | |
this adds up a Specific set of coefficients for terms(coins)" | |
(reduce + (map #(* %1 %2) coeffs terms))) | |
(defn coeffs [dollar coin] | |
"return a sequence of coeffs from 0 to the divisor of the dollar amt by the coin |

NewerOlder