Some points on idiomatic Clojure:
- Do not return
nilfrom if statements:(if condition? nil false-branch)->(if-not condition? false-branch) defnbodies in the next line unless they are truly one liners (not like inBooth-Booked-Indicator.- Don't use
(eval f)->but resolve the function and call it directly as(f).
Conceptually:
- If you want to define your own types use
defrecordanddeftype(defrecordin this case).Poss-Dupe,Order-Time Order-Date, etc. should be records, and it might be cleaner if they use the samefnbindings, instead of[[x]]and[x], only one of the two. - Instead of defining of passing around a function, evaluating it, checking for a
NullPointerException, and then going to the default implementation, consider using a protocol. For example,IParse (parse [f]). You can then implementparsefor your different types and leave a default implementation. Thentry-callwill be just reduced to-parse.