diff options
Diffstat (limited to 'src/clojure/contrib/dataflow.clj')
-rw-r--r-- | src/clojure/contrib/dataflow.clj | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/clojure/contrib/dataflow.clj b/src/clojure/contrib/dataflow.clj index eed0bad2..a87ef357 100644 --- a/src/clojure/contrib/dataflow.clj +++ b/src/clojure/contrib/dataflow.clj @@ -97,11 +97,16 @@ (> (count cells) 1) (throwf Exception "Cell %s has multiple instances" name) :otherwise (throwf Exception "Cell %s is undefined" name)))) +(defn source-cell? + "Is this cell a source cell?" + [cell] + (isa? (:cell-type cell) ::source-cell)) + (defn get-source-cells "Returns a collection of source cells from the dataflow" [df] (for [cell (:cells @df) - :when (isa? (:cell-type cell) ::source-cell)] + :when (source-cell? cell)] cell)) (defn get-value |