(defn basic-item-total [price quantity]
(* price quantity))
(defn with-line-item-conditions [f price quantity]
{:pre [(> price 0) (> quantity 0)]
:post [(> % 1)]}
(apply f price quantity))
आरईपीएल पर मूल्यांकन:
निम्न अपवाद में(with-line-item-conditions basic-item-total 20 1)
परिणाम फेंके:
Don't know how to create ISeq from: java.lang.Long
[Thrown class java.lang.IllegalArgumentException]
ऐसा प्रतीत होता है अपवाद वें किया जा रहा है लागू प्रक्रिया के बाद rown मूल्यांकन किया जाता है।
'लागू' एक फ़ंक्शन है, मैक्रो नहीं। – amalloy