(defn ret-match-row "Finds a row in in-seqB that matches in-valA and in-seq-keyB" [in-valA in-seq-keyB in-seqB] (filter #(= in-valA (in-seq-keyB %1)) in-seqB))
I want to expand this function, so that it still must always accept one comparison key and that
n more comparison keys could be passed to the function if need be.
The only way I can think of to do this is create a non
# anonymous function that would handle the comparison of multiple arguments. I do not know Clojure macros well enough to know if this would be an appropriate place to use a macro.
Minimally I would rewrite the function's argument signature like this:
(defn ret-match-row "Finds a row in in-seqB that matches in-valA and other optional vals." [match-keyA in-seq-keyB in-seqB & optional-match-keys]
Any thoughts, pointers, or guidance would be appreciated.
Here is some dummied up real data (dummied up to protected sensitive information)
I need to filter on the ssn field (xyz-...) and the health description as an AND condition. I've dummied up the health description as HEALTHCO, but, in reality, the health description includes words like SPOUSE, SINGLE, and so on and is much more robust.