Clojure-Contrib

Contribs profiler can run into an Exception

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

The profile function from clojure.contrib.profile can run into
an Exception when it's argument is a lazy sequence.
Reproduce this problem:

(use 'clojure.contrib.profile)

(defn foo [x] (prof :foo (+ x 10)))

(profile (map foo (range 5))) ==>
java.lang.IllegalArgumentException: Wrong number of args passed to: core$max

(profile (pmap foo (range 5))) ==>
java.lang.IllegalArgumentException: Wrong number of args passed to: core$max

(profile (doseq [i (range 5)] (foo i))) ==> Works fine

Activity

No changes have yet been made on this issue.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: