Re: spec for a multi-arity function

2017-10-05 Thread Alex Miller
I should also mention that the s/alt one is fine too, but in general I find receiving the same conformed map in either case but with keys either present or absent works better with all your typical Clojure destructuring etc so I prefer the s/? version. On Thursday, October 5, 2017 at 2:34:36 PM

Re: spec for a multi-arity function

2017-10-05 Thread Alex Miller
On Thursday, October 5, 2017 at 2:02:10 PM UTC-5, Peter Hull wrote: > > Is there any guidance on how to do the fdef for a function with more than > one arity? As an example, this one which takes one or two arguments: > The regex specs can cover multiple options via ?, *, etc. > > (defn repor