Working on the following example in "Clojure in Action" (p. 63):
(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))
Evaluating on the REPL:
(with-line-item-conditions basic-item-total 20 1)
Results in the following exception being thrown:
Don't know how to create ISeq from: java.lang.Long
[Thrown class java.lang.IllegalArgumentException]
It appears the exception is being thrown after the apply procedure is evaluated.
apply
is a function, not a macro. – Cam