Skip to content

Instantly share code, notes, and snippets.

@aufrank
Created September 7, 2011 17:57
Show Gist options
  • Save aufrank/1201257 to your computer and use it in GitHub Desktop.
Save aufrank/1201257 to your computer and use it in GitHub Desktop.
mapping trouble
(defrecord Node [^Float activation neighbors])
(def k (Node. 0.2 '(kaet)))
(def ae (Node. 0.2 '(kaet)))
(def t (Node. 0.2 '(kaet)))
(def kaet
(Node. 0.2 '(k ae t cat)))
(def cat (Node. 0.2 '(kaet)))
(map #(:activation %) (:neighbors kaet))
;;; expected (0.2 0.2 0.2 0.2)
;;; got (nil nil nil nil)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment