Re: break-on-gaps - just curious if there is a more idiomatic way to do this

2011-10-03 Thread Thierry Pirot
qhfgva, 2011-09-28 20:39 +0200 > I was wondering if there is a more clever/idiomatic way > to solve this problem. > > (defn break-on-gaps [minutes] > (reduce (fn [acc x] > (if (empty? acc) > [[x]] > (if (= (inc (last (last acc))) x) > (conj (vec (bu

Re: why doesn't a function have a type ?

2010-09-16 Thread Thierry Pirot
Belun writes: > why isn't the type of a function : clojure.lang.IFn ? > it's this instead : > user=> (type #(str "wonder" "what" "this" "is")) > user$eval7$fn__8 user> (class #(str "wonder" "what" "this" "is")) user$eval3515$fn__3516 user> (pprint1 (ancestors *1)) #{clojure.lang.Fn clojure.lang.