0.1.0-SNAPSHOT Arrow_down_16x16

changed-path

clj-swing.tree

  • (changed-path map-a map-b)

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clj_swing/tree.clj:31 top

(defn changed-path [map-a map-b]
  (if (or (= map-a map-b)
	  (not (map? map-a))
	  (not (map? map-b))
	  (not= (keys map-a) (keys map-b)))
    []
    (let [c (filter #(not= (get map-a %) (get map-b %)) (keys map-a))]
      (if (= 1 (count c))
	(let [c (first c)]
	  (cons c (changed-path (get map-a c) (get map-b c))))
	[]))))
Vars in clj-swing.tree/changed-path: = cons count defn get keys let map? not not= or
Used in 0 other vars

Comments top

No comments for changed-path. Log in to add a comment.