How might you implement design-by-contract in Clojure specifically or functional languages in general? -


I like the examples in Lisp type (Bonus points for the closure or scheme), because I am the most

(defn foo [action options]

(when- no (no (and (: (- (- ("-" ("no" (Behind (invalid execution exception "unknown action")) Speed ​​Options (): (): (throwing) "alternate" "turn-behind" "turn-by-turn"} (throwing) (Invalid argument exception "invalid speed"))); We get the logic of logic. I do not like about this implementation that the contract argument obscures the main methodology; the correct purpose of the function in the conditional investigation is lost. This is the same issue which I have picked up in a compulsory language like Java, I can embed antenna or metadata / attributes in the document, which means the contract is implemented. .

Is anyone planning to add an agreement to the metadata in the closure? How will the high-order function be used? What are the other options?

Closer are already supporting for pre and post status, unfortunately well Not documented:


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -