Fork me on GitHub

is there a cheaper way to get list of parent ids by child ids, than reducing over all of the datoms?


for 60k datoms db in clj times (dotimes 1) are

"Elapsed time: 0.337429 msecs" ;; filter datoms
"Elapsed time: 0.703007 msecs" ;; mapcat filtered datoms
"Elapsed time: 0.217288 msecs" ;; filtered db.
also mapcat (second) gives invalid results, so there might be a bug in my code above.