Cecil Westerhof <cldwester...@gmail.com> writes: Hi!
> At the moment the following: > (lucky-numbers 10000001) > gives: > AssertionError Assert failed: (<= upto (* 10 1000 1000)) user/lucky-numbers > > But I would like the following to be executed: > (lucky-numbers :no-max-check 10000001) > > How would I implement that? Just make an optional argument, e.g., (defn lucky-numbers ([upto] (lucky-numbers false upto)) ([no-max-check upto] {:pre [(if no-max-check true (<= upto (* 10 1000 1000)))]} ;; code as before )) Bye, Tassilo -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.