Clozure / ccl

Clozure Common Lisp
http://ccl.clozure.com
Apache License 2.0
852 stars 103 forks source link

ADVISE examples are wrong #26

Open almsanac opened 7 years ago

almsanac commented 7 years ago

The documentation for advise ([http://ccl.clozure.com/docs/ccl.html#advising]) is buggy. Instead of arglist both examples should say (car arglist).

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/42824543-advise-examples-are-wrong?utm_campaign=plugin&utm_content=tracker%2F27935804&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F27935804&utm_medium=issues&utm_source=github).
Devon7 commented 6 years ago

Surely (notevery #'numberp arglist) or even (some (complement #'numberp) arglist) beats (some #'(lambda (n) (not (numberp n))) arglist) in the example at http://ccl.clozure.com/docs/ccl.html#advising which reads

(advise foo (if (some #'(lambda (n) (not (numberp n))) arglist)
          0
          (:do-it))
    :when :around :name :zero-if-not-nums)