Clojure

Should "some" be using "seq?" rather than "seq" ?

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Declined
  • Affects Version/s: Release 1.2
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    Mac OS X Java 6

Description

Very minor, but noticed while browsing that "some" is defined as:

(defn some
...
[pred coll]
(when (seq coll)
(or (pred (first coll)) (recur pred (next coll)))))

The "(seq coll)" call will potentially generate an unused seq each time.

Activity

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: