Jeez, that's amazing. Thanks a lot; I had no idea that trees-seq
existed. I keep getting surprised by Clojure.
On Oct 24, 2:05 pm, James Reeves wrote:
> This is a slightly faster and somewhat shorter version:
>
> (defn find-dependencies2
> [rel-rep]
> (set (filter symbol? (tree-seq seq? rest
This is a slightly faster and somewhat shorter version:
(defn find-dependencies2
[rel-rep]
(set (filter symbol? (tree-seq seq? rest rel-rep
- James
On Oct 24, 9:55 pm, samppi wrote:
> I suspect the code below can be improved. The function returns the set
> of all symbols inside a list-
I suspect the code below can be improved. The function returns the set
of all symbols inside a list-tree that are not at the beginning of a
list. Is there a way to make the code more compact or faster?
(with-test
(defn- find-dependencies
[rel-rep]
(cond
(list? rel-rep)
(le