bhiles/cascalog — pull request #13 by bhiles (2014-12-08 02:33:57+00:00)
Title: add sinks to the In-Memory platform

Currently the In-memory platform doesn't support sinks. This change will allow for sinks. I've created two implementations a std-out sink which writes the output to std-out. And an atom sink which resets the atom to containing the output.

You can use these sinks like:

(use 'cascalog.api)
(set-in-memory-platform!)
(def results (atom []))
(?- results (<- [?a] ([[1] [2] [3]] ?a)))
@results ;; ({"?a" 1} {"?a" 2} {"?a" 3})